summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQianfeng Rong <rongqianfeng@vivo.com>2025-08-27 20:39:12 +0800
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2025-09-09 15:59:16 +0200
commita1dcf9a069f7e2b7571bc0aaa4e8a742c6f78fe8 (patch)
treefdc8d671d6f3a262ce9b5f4511297a477bfab5c4
parent27296c1f0027a9b35faa7af71d7490c96409551e (diff)
downloadlinux-a1dcf9a069f7e2b7571bc0aaa4e8a742c6f78fe8.tar.gz
linux-a1dcf9a069f7e2b7571bc0aaa4e8a742c6f78fe8.zip
media: stm32-dcmi: use int type to store negative error codes
Change "ret" from unsigned int to int type in dcmi_framesizes_init() and dcmi_graph_notify_bound() to store negative error codes or zero returned by v4l2_subdev_call() and media_create_pad_link() - this better aligns with the coding standards and maintains code consistency. No effect on runtime. Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
-rw-r--r--drivers/media/platform/st/stm32/stm32-dcmi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/platform/st/stm32/stm32-dcmi.c b/drivers/media/platform/st/stm32/stm32-dcmi.c
index d94c61b8569d..13762861b769 100644
--- a/drivers/media/platform/st/stm32/stm32-dcmi.c
+++ b/drivers/media/platform/st/stm32/stm32-dcmi.c
@@ -1701,8 +1701,8 @@ static int dcmi_framesizes_init(struct stm32_dcmi *dcmi)
.which = V4L2_SUBDEV_FORMAT_ACTIVE,
.code = dcmi->sd_format->mbus_code,
};
- unsigned int ret;
unsigned int i;
+ int ret;
/* Allocate discrete framesizes array */
while (!v4l2_subdev_call(subdev, pad, enum_frame_size,
@@ -1808,8 +1808,8 @@ static int dcmi_graph_notify_bound(struct v4l2_async_notifier *notifier,
struct v4l2_async_connection *asd)
{
struct stm32_dcmi *dcmi = notifier_to_dcmi(notifier);
- unsigned int ret;
int src_pad;
+ int ret;
dev_dbg(dcmi->dev, "Subdev \"%s\" bound\n", subdev->name);