[PATCH] media: i2c: fix returnvar.cocci warnings

From: kernel test robot
Date: Wed Jan 19 2022 - 00:25:24 EST


From: kernel test robot <lkp@xxxxxxxxx>

drivers/media/i2c/ov5693.c:953:5-8: Unneeded variable: "ret". Return "0" on line 985


Remove unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

CC: Daniel Scally <djrscally@xxxxxxxxx>
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Signed-off-by: kernel test robot <lkp@xxxxxxxxx>
---

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 99613159ad749543621da8238acf1a122880144e
commit: 89aef879cb537061f7a0948210fc00c5f1b5dfb4 media: i2c: Add support for ov5693 sensor
:::::: branch date: 17 hours ago
:::::: commit date: 7 weeks ago

ov5693.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

--- a/drivers/media/i2c/ov5693.c
+++ b/drivers/media/i2c/ov5693.c
@@ -950,7 +950,6 @@ static int ov5693_set_fmt(struct v4l2_su
unsigned int width, height;
unsigned int hblank;
int exposure_max;
- int ret = 0;

crop = __ov5693_get_pad_crop(ov5693, state, format->pad, format->which);

@@ -982,7 +981,7 @@ static int ov5693_set_fmt(struct v4l2_su
format->format = *fmt;

if (format->which == V4L2_SUBDEV_FORMAT_TRY)
- return ret;
+ return 0;

mutex_lock(&ov5693->lock);

@@ -1012,7 +1011,7 @@ static int ov5693_set_fmt(struct v4l2_su
exposure_max));

mutex_unlock(&ov5693->lock);
- return ret;
+ return 0;
}

static int ov5693_get_selection(struct v4l2_subdev *sd,