* [PATCH] media: i2c: remove unneeded variable 'ret'
@ 2021-03-10 8:52 Yang Li
0 siblings, 0 replies; only message in thread
From: Yang Li @ 2021-03-10 8:52 UTC (permalink / raw)
To: mchehab; +Cc: linux-media, linux-kernel, Yang Li
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>
---
drivers/media/i2c/ov8865.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/media/i2c/ov8865.c b/drivers/media/i2c/ov8865.c
index 36a60fb..2db052f 100644
--- a/drivers/media/i2c/ov8865.c
+++ b/drivers/media/i2c/ov8865.c
@@ -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 = {
--
1.8.3.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-03-10 8:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-10 8:52 [PATCH] media: i2c: remove unneeded variable 'ret' Yang Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®