media: v4l: cadence: Fix how unsued lanes are handled in 'csi2rx_start()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Fri, 13 Sep 2019 19:06:47 +0000 (16:06 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Jan 2020 18:47:11 +0000 (19:47 +0100)
commite6e1409d3c2b05b4e4c992b740a3b4e224b741e4
treedf3365b3ce11c37f97dd1bf1b499c123b056f06d
parent83072371129dd709b9bad761a630e4a2f9d48feb
media: v4l: cadence: Fix how unsued lanes are handled in 'csi2rx_start()'

commit 2eca8e4c1df4864b937752c3aa2f7925114f4806 upstream.

The 2nd parameter of 'find_first_zero_bit()' is a number of bits, not of
bytes. So use 'csi2rx->max_lanes' instead of 'sizeof(lanes_used)'.

Fixes: 1fc3b37f34f6 ("media: v4l: cadence: Add Cadence MIPI-CSI2 RX driver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/platform/cadence/cdns-csi2rx.c