Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Qianfeng Rong and committed by
Mauro Carvalho Chehab
a1dcf9a0 27296c1f

+2 -2
+2 -2
drivers/media/platform/st/stm32/stm32-dcmi.c
··· 1701 1701 .which = V4L2_SUBDEV_FORMAT_ACTIVE, 1702 1702 .code = dcmi->sd_format->mbus_code, 1703 1703 }; 1704 - unsigned int ret; 1705 1704 unsigned int i; 1705 + int ret; 1706 1706 1707 1707 /* Allocate discrete framesizes array */ 1708 1708 while (!v4l2_subdev_call(subdev, pad, enum_frame_size, ··· 1808 1808 struct v4l2_async_connection *asd) 1809 1809 { 1810 1810 struct stm32_dcmi *dcmi = notifier_to_dcmi(notifier); 1811 - unsigned int ret; 1812 1811 int src_pad; 1812 + int ret; 1813 1813 1814 1814 dev_dbg(dcmi->dev, "Subdev \"%s\" bound\n", subdev->name); 1815 1815