From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============8460973248591684280==" MIME-Version: 1.0 From: kernel test robot Subject: [PATCH] media: i2c: fix returnvar.cocci warnings Date: Sun, 14 Feb 2021 03:50:48 +0800 Message-ID: <20210213195048.GA3697@422e3e5d041a> In-Reply-To: <202102140355.8rFT4Oov-lkp@intel.com> List-Id: To: kbuild@lists.01.org --===============8460973248591684280== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable CC: kbuild-all(a)lists.01.org CC: Linux Memory Management List TO: Paul Kocialkowski CC: Mauro Carvalho Chehab CC: linux-media(a)vger.kernel.org CC: "K=C3=A9vin L'h=C3=B4pital" CC: Sakari Ailus CC: linux-kernel(a)vger.kernel.org From: kernel test robot drivers/media/i2c/ov8865.c:2527:5-8: Unneeded variable: "ret". Return "0" o= n 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 Reported-by: kernel test robot Signed-off-by: kernel test robot --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git= master head: 07f7e57c63aaa2afb4ea31edef05e08699a63a00 commit: 11c0d8fdccc56fa15cb15906480b4737c31dd085 [2378/11103] media: i2c: A= dd 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 =3D ov8865_subdev_sensor(subdev); const struct ov8865_mode *mode; - int ret =3D 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 =3D { --===============8460973248591684280==--