media: i2c: remove unneeded variable 'ret'
authorYang Li <yang.lee@linux.alibaba.com>
Wed, 10 Mar 2021 08:52:14 +0000 (09:52 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 6 Apr 2021 12:33:59 +0000 (14:33 +0200)
Fix the following coccicheck warning:
./drivers/media/i2c/ov8865.c:2527:5-8: Unneeded variable: "ret". Return
"0" on line 2536

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/i2c/ov8865.c

index 36a60fbc211d72f7556f8fad2a00444ee311aab7..2db052ff9d2167f432243a6aca44309dd76f9bd8 100644 (file)
@@ -2524,7 +2524,6 @@ static int ov8865_g_frame_interval(struct v4l2_subdev *subdev,
 {
        struct ov8865_sensor *sensor = ov8865_subdev_sensor(subdev);
        const struct ov8865_mode *mode;
-       int ret = 0;
 
        mutex_lock(&sensor->mutex);
 
@@ -2533,7 +2532,7 @@ static int ov8865_g_frame_interval(struct v4l2_subdev *subdev,
 
        mutex_unlock(&sensor->mutex);
 
-       return ret;
+       return 0;
 }
 
 static const struct v4l2_subdev_video_ops ov8865_subdev_video_ops = {