mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
media: ipu3-cio2: Fix mbus_code processing in cio2_subdev_set_fmt()
commit334de4b458upstream. Loop was useless as it would always exit on the first iteration. Fix it with right condition. Signed-off-by: Pavel Machek (CIP) <pavel@denx.de> Fixes:a86cf9b29e("media: ipu3-cio2: Validate mbus format in setting subdev format") Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: stable@vger.kernel.org # v4.16 and up Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
3a4c5d7261
commit
d0f6efac3c
@@ -1277,7 +1277,7 @@ static int cio2_subdev_set_fmt(struct v4l2_subdev *sd,
|
||||
fmt->format.code = formats[0].mbus_code;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(formats); i++) {
|
||||
if (formats[i].mbus_code == fmt->format.code) {
|
||||
if (formats[i].mbus_code == mbus_code) {
|
||||
fmt->format.code = mbus_code;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user