Skip to content

Commit f9f96fc

Browse files
hverkuilmchehab
authored andcommitted
[media] cec: fix wrong last_la determination
Due to an incorrect condition the last_la used for the initial attempt at claiming a logical address could be wrong. The last_la wasn't converted to a mask when ANDing with type2mask, so that test was broken. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 8015d6b commit f9f96fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/media/cec/cec-adap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1206,7 +1206,7 @@ static int cec_config_thread_func(void *arg)
12061206
las->log_addr[i] = CEC_LOG_ADDR_INVALID;
12071207
if (last_la == CEC_LOG_ADDR_INVALID ||
12081208
last_la == CEC_LOG_ADDR_UNREGISTERED ||
1209-
!(last_la & type2mask[type]))
1209+
!((1 << last_la) & type2mask[type]))
12101210
last_la = la_list[0];
12111211

12121212
err = cec_config_log_addr(adap, i, last_la);

0 commit comments

Comments
 (0)