From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============4092101309412495488==" MIME-Version: 1.0 From: kernel test robot Subject: [PATCH] media: i2c: fix odd_ptr_err.cocci warnings Date: Sun, 17 Jan 2021 03:58:50 +0800 Message-ID: <20210116195850.GA1463@9d9cf5c8121f> In-Reply-To: <202101170356.H6UyKhCZ-lkp@intel.com> List-Id: To: kbuild@lists.01.org --===============4092101309412495488== 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:2850:5-11: inconsistent IS_ERR and PTR_ERR on li= ne 2852. PTR_ERR should access the value just tested by IS_ERR Semantic patch information: There can be false positives in the patch case, where it is the call to IS_ERR that is wrong. Generated by: scripts/coccinelle/tests/odd_ptr_err.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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/media/i2c/ov8865.c +++ b/drivers/media/i2c/ov8865.c @@ -2849,7 +2849,7 @@ static int ov8865_probe(struct i2c_clien sensor->avdd =3D devm_regulator_get(dev, "avdd"); if (IS_ERR(sensor->avdd)) { dev_err(dev, "cannot get AVDD (analog) regulator\n"); - ret =3D PTR_ERR(sensor->dvdd); + ret =3D PTR_ERR(sensor->avdd); goto error_endpoint; } =20 --===============4092101309412495488==--