Skip to content

Commit

Permalink
[media] cec: fix wrong last_la determination
Browse files Browse the repository at this point in the history
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 <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
  • Loading branch information
hverkuil authored and mchehab committed Jan 30, 2017
1 parent 8015d6b commit f9f96fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/cec/cec-adap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1206,7 +1206,7 @@ static int cec_config_thread_func(void *arg)
las->log_addr[i] = CEC_LOG_ADDR_INVALID;
if (last_la == CEC_LOG_ADDR_INVALID ||
last_la == CEC_LOG_ADDR_UNREGISTERED ||
!(last_la & type2mask[type]))
!((1 << last_la) & type2mask[type]))
last_la = la_list[0];

err = cec_config_log_addr(adap, i, last_la);
Expand Down

0 comments on commit f9f96fc

Please sign in to comment.