summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2017-01-10 09:44:54 -0200
committerRay Zhang <rayz@codeaurora.org>2017-05-25 11:22:21 +0800
commit913877c1286f7f202f07fd5ddd0f9cddb7b212a8 (patch)
tree0ba6d64b990846962bf23c0fd3cd8c89bc1645b0 /drivers
parent359324cb0fb43223affc06f19f29b43abe125152 (diff)
[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. Change-Id: I3d0f3f6bea3045808333cfde55ecd677e7799ce2 Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Git-commit: f9f96fc10c09ca16e336854c08bc1563eed97985 Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git Signed-off-by: Ray Zhang <rayz@codeaurora.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/cec/cec-adap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/cec/cec-adap.c b/drivers/media/cec/cec-adap.c
index ebb5e391b800..87a6b65ed3af 100644
--- a/drivers/media/cec/cec-adap.c
+++ b/drivers/media/cec/cec-adap.c
@@ -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);