public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Daniel Scally <djrscally@gmail.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-media@vger.kernel.org,
	Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>,
	Sakari Ailus <sakari.ailus@linux.intel.com>
Subject: [PATCH] media: i2c: fix returnvar.cocci warnings
Date: Wed, 19 Jan 2022 13:24:47 +0800	[thread overview]
Message-ID: <20220119052447.GA6019@12eccf4f161c> (raw)
In-Reply-To: <202201191326.BbZWNNQm-lkp@intel.com>

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

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@gmail.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/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,

  parent reply	other threads:[~2022-01-19  5:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 boolconv.cocci warnings kernel test robot
2022-01-19  5:24 ` kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-10-03 11:43 [PATCH] media: i2c: fix returnvar.cocci warnings 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=20220119052447.GA6019@12eccf4f161c \
    --to=lkp@intel.com \
    --cc=djrscally@gmail.com \
    --cc=jeanmichel.hautbois@ideasonboard.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox