]> www.infradead.org Git - users/hch/misc.git/commitdiff
media: raspberrypi: use int type to store negative error codes
authorQianfeng Rong <rongqianfeng@vivo.com>
Wed, 27 Aug 2025 12:39:11 +0000 (20:39 +0800)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 9 Sep 2025 13:59:16 +0000 (15:59 +0200)
Use int instead of unsigned int for the 'ret' variable in csi2_init() to
store negative error codes or zero returned by media_entity_pads_init().

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>
drivers/media/platform/raspberrypi/rp1-cfe/csi2.c

index 35c2ab1e2cd4d549ba8d73f339d6b67952c1d250..2c5b4d24b4e6f033df6bfd21fded340df5370b4e 100644 (file)
@@ -525,7 +525,7 @@ static const struct v4l2_subdev_internal_ops csi2_internal_ops = {
 
 int csi2_init(struct csi2_device *csi2, struct dentry *debugfs)
 {
-       unsigned int ret;
+       int ret;
 
        spin_lock_init(&csi2->errors_lock);