All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [PATCH] media: i2c: fix returnvar.cocci warnings
Date: Sun, 14 Feb 2021 03:50:48 +0800	[thread overview]
Message-ID: <20210213195048.GA3697@422e3e5d041a> (raw)
In-Reply-To: <202102140355.8rFT4Oov-lkp@intel.com>

[-- Attachment #1: Type: text/plain, Size: 1804 bytes --]

CC: kbuild-all(a)lists.01.org
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
CC: Mauro Carvalho Chehab <mchehab@kernel.org>
CC: linux-media(a)vger.kernel.org
CC: "Kévin L'hôpital" <kevin.lhopital@bootlin.com>
CC: Sakari Ailus <sakari.ailus@linux.intel.com>
CC: linux-kernel(a)vger.kernel.org

From: kernel test robot <lkp@intel.com>

drivers/media/i2c/ov8865.c:2527:5-8: Unneeded variable: "ret". Return "0" on line 2536


 Remove unneeded variable used to store return value.

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

Fixes: 11c0d8fdccc5 ("media: i2c: Add support for the OV8865 image sensor")
CC: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   07f7e57c63aaa2afb4ea31edef05e08699a63a00
commit: 11c0d8fdccc56fa15cb15906480b4737c31dd085 [2378/11103] media: i2c: Add support for the OV8865 image sensor
:::::: branch date: 33 hours ago
:::::: commit date: 5 weeks ago

Please take the patch only if it's a positive warning. Thanks!

 ov8865.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/drivers/media/i2c/ov8865.c
+++ b/drivers/media/i2c/ov8865.c
@@ -2524,7 +2524,6 @@ static int ov8865_g_frame_interval(struc
 {
 	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(struc
 
 	mutex_unlock(&sensor->mutex);
 
-	return ret;
+	return 0;
 }
 
 static const struct v4l2_subdev_video_ops ov8865_subdev_video_ops = {

  reply	other threads:[~2021-02-13 19:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-13 19:50 [linux-next:master 2378/11103] drivers/media/i2c/ov8865.c:2527:5-8: Unneeded variable: "ret". Return "0" on line 2536 kernel test robot
2021-02-13 19:50 ` kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-01-19  5:26 drivers/media/i2c/ov5693.c:989:46-51: WARNING: conversion to bool not needed here kernel test robot
2022-01-19  5:24 ` [PATCH] media: i2c: fix returnvar.cocci warnings kernel test robot
2022-01-19  5:24   ` kernel test robot
2021-01-16 19:58 [linux-next:master 2650/3956] drivers/media/i2c/ov8865.c:2850:5-11: inconsistent IS_ERR and PTR_ERR on line 2852 kernel test robot
2021-01-16 19:58 ` [PATCH] media: i2c: fix returnvar.cocci warnings kernel test robot
2019-10-03 11:43 Julia Lawall
2019-10-03 11:43 ` Julia Lawall
2019-10-03 11:43 ` Julia Lawall
2019-10-03 11:43 ` Julia Lawall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210213195048.GA3697@422e3e5d041a \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.