From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============2884140664417980304==" MIME-Version: 1.0 From: kernel test robot Subject: [PATCH] media: i2c: fix returnvar.cocci warnings Date: Sun, 17 Jan 2021 03:58:51 +0800 Message-ID: <20210116195851.GA1771@9d9cf5c8121f> In-Reply-To: <202101170356.H6UyKhCZ-lkp@intel.com> List-Id: To: kbuild@lists.01.org --===============2884140664417980304== 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: b3a3cbdec55b090d22a09f75efb7c7d34cb97f25 commit: 11c0d8fdccc56fa15cb15906480b4737c31dd085 [2650/3956] media: i2c: Ad= d support for the OV8865 image sensor :::::: branch date: 2 days ago :::::: commit date: 4 days 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 { --===============2884140664417980304==--