[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250314152939.2759573-15-serghox@gmail.com>
Date: Fri, 14 Mar 2025 18:29:35 +0300
From: Sergey Khimich <serghox@...il.com>
To: linux-media@...r.kernel.org
Cc: Philipp Zabel <p.zabel@...gutronix.de>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
linux-kernel@...r.kernel.org,
Vladimir Yakovlev <vovchkir@...il.com>,
Maksim Turok <turok.m7@...il.com>
Subject: [PATCH 14/18] media: coda: Fix handling wrong format in coda_try_fmt
From: Vladimir Yakovlev <vovchkir@...il.com>
No need to print BUG() report when received wrong format
in coda_try_fmt. It's enough to print log and return an error.
Co-developed-by: Sergey Khimich <serghox@...il.com>
Signed-off-by: Sergey Khimich <serghox@...il.com>
Signed-off-by: Vladimir Yakovlev <vovchkir@...il.com>
---
drivers/media/platform/chips-media/coda/coda-common.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/media/platform/chips-media/coda/coda-common.c b/drivers/media/platform/chips-media/coda/coda-common.c
index 29b01ade8829..9b443ddabeab 100644
--- a/drivers/media/platform/chips-media/coda/coda-common.c
+++ b/drivers/media/platform/chips-media/coda/coda-common.c
@@ -644,7 +644,9 @@ static int coda_try_fmt(struct coda_ctx *ctx, const struct coda_codec *codec,
f->fmt.pix.height);
break;
default:
- BUG();
+ v4l2_warn(&dev->v4l2_dev, "Warning: wrong format=0x%04X",
+ f->fmt.pix.pixelformat);
+ return -EINVAL;
}
return 0;
--
2.30.2
Powered by blists - more mailing lists