All of lore.kernel.org
 help / color / mirror / Atom feed
* [git:media_tree/master] media: ipu3-cio2: Fix mbus_code processing in cio2_subdev_set_fmt()
@ 2021-01-12 16:09 Mauro Carvalho Chehab
  0 siblings, 0 replies; only message in thread
From: Mauro Carvalho Chehab @ 2021-01-12 16:09 UTC (permalink / raw)
  To: linuxtv-commits; +Cc: Sakari Ailus, Laurent Pinchart, stable, Pavel Machek

This is an automatic generated email to let you know that the following patch were queued:

Subject: media: ipu3-cio2: Fix mbus_code processing in cio2_subdev_set_fmt()
Author:  Pavel Machek <pavel@denx.de>
Date:    Wed Dec 30 13:55:50 2020 +0100

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: a86cf9b29e8b ("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>

 drivers/media/pci/intel/ipu3/ipu3-cio2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

---

diff --git a/drivers/media/pci/intel/ipu3/ipu3-cio2.c b/drivers/media/pci/intel/ipu3/ipu3-cio2.c
index 36e354ecf71e..e8ea69d30bfd 100644
--- a/drivers/media/pci/intel/ipu3/ipu3-cio2.c
+++ b/drivers/media/pci/intel/ipu3/ipu3-cio2.c
@@ -1269,7 +1269,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;
 		}

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-01-12 16:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-12 16:09 [git:media_tree/master] media: ipu3-cio2: Fix mbus_code processing in cio2_subdev_set_fmt() Mauro Carvalho Chehab

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.