* [PATCH] media: i2c: fix odd_ptr_err.cocci warnings
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 ` kernel test robot
0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2021-01-16 19:58 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 1799 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:2850:5-11: inconsistent IS_ERR and PTR_ERR on line 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 <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: b3a3cbdec55b090d22a09f75efb7c7d34cb97f25
commit: 11c0d8fdccc56fa15cb15906480b4737c31dd085 [2650/3956] media: i2c: Add 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 = devm_regulator_get(dev, "avdd");
if (IS_ERR(sensor->avdd)) {
dev_err(dev, "cannot get AVDD (analog) regulator\n");
- ret = PTR_ERR(sensor->dvdd);
+ ret = PTR_ERR(sensor->avdd);
goto error_endpoint;
}
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] media: i2c: fix odd_ptr_err.cocci warnings
@ 2021-01-16 20:11 ` Julia Lawall
0 siblings, 0 replies; 6+ messages in thread
From: Julia Lawall @ 2021-01-16 20:11 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 1203 bytes --]
From: kernel test robot <lkp@intel.com>
PTR_ERR should access the value just tested by IS_ERR
Generated by: scripts/coccinelle/tests/odd_ptr_err.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>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
---
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: b3a3cbdec55b090d22a09f75efb7c7d34cb97f25
commit: 11c0d8fdccc56fa15cb15906480b4737c31dd085 [2650/3956] media: i2c: Add support for the OV8865 image sensor
:::::: branch date: 2 days ago
:::::: commit date: 4 days ago
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 = devm_regulator_get(dev, "avdd");
if (IS_ERR(sensor->avdd)) {
dev_err(dev, "cannot get AVDD (analog) regulator\n");
- ret = PTR_ERR(sensor->dvdd);
+ ret = PTR_ERR(sensor->avdd);
goto error_endpoint;
}
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] media: i2c: fix odd_ptr_err.cocci warnings
@ 2021-01-16 20:11 ` Julia Lawall
0 siblings, 0 replies; 6+ messages in thread
From: Julia Lawall @ 2021-01-16 20:11 UTC (permalink / raw)
To: Paul Kocialkowski
Cc: Mauro Carvalho Chehab, linux-media, Kévin L'hôpital,
Sakari Ailus, linux-kernel, Linux Memory Management List,
kbuild-all
From: kernel test robot <lkp@intel.com>
PTR_ERR should access the value just tested by IS_ERR
Generated by: scripts/coccinelle/tests/odd_ptr_err.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>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
---
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: b3a3cbdec55b090d22a09f75efb7c7d34cb97f25
commit: 11c0d8fdccc56fa15cb15906480b4737c31dd085 [2650/3956] media: i2c: Add support for the OV8865 image sensor
:::::: branch date: 2 days ago
:::::: commit date: 4 days ago
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 = devm_regulator_get(dev, "avdd");
if (IS_ERR(sensor->avdd)) {
dev_err(dev, "cannot get AVDD (analog) regulator\n");
- ret = PTR_ERR(sensor->dvdd);
+ ret = PTR_ERR(sensor->avdd);
goto error_endpoint;
}
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] media: i2c: fix odd_ptr_err.cocci warnings
2021-01-16 20:11 ` Julia Lawall
(?)
@ 2021-01-18 13:55 ` Paul Kocialkowski
2021-02-01 13:04 ` Sakari Ailus
-1 siblings, 1 reply; 6+ messages in thread
From: Paul Kocialkowski @ 2021-01-18 13:55 UTC (permalink / raw)
To: Julia Lawall
Cc: Mauro Carvalho Chehab, linux-media, Kévin L'hôpital,
Sakari Ailus, linux-kernel, Linux Memory Management List,
kbuild-all
[-- Attachment #1: Type: text/plain, Size: 1517 bytes --]
Hi,
On Sat 16 Jan 21, 21:11, Julia Lawall wrote:
> From: kernel test robot <lkp@intel.com>
>
> PTR_ERR should access the value just tested by IS_ERR
Good catch!
Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Cheers,
Paul
> Generated by: scripts/coccinelle/tests/odd_ptr_err.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>
> Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
> ---
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: b3a3cbdec55b090d22a09f75efb7c7d34cb97f25
> commit: 11c0d8fdccc56fa15cb15906480b4737c31dd085 [2650/3956] media: i2c: Add support for the OV8865 image sensor
> :::::: branch date: 2 days ago
> :::::: commit date: 4 days ago
>
> 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 = devm_regulator_get(dev, "avdd");
> if (IS_ERR(sensor->avdd)) {
> dev_err(dev, "cannot get AVDD (analog) regulator\n");
> - ret = PTR_ERR(sensor->dvdd);
> + ret = PTR_ERR(sensor->avdd);
> goto error_endpoint;
> }
>
--
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] media: i2c: fix odd_ptr_err.cocci warnings
2021-01-18 13:55 ` Paul Kocialkowski
@ 2021-02-01 13:04 ` Sakari Ailus
0 siblings, 0 replies; 6+ messages in thread
From: Sakari Ailus @ 2021-02-01 13:04 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 1129 bytes --]
On Mon, Jan 18, 2021 at 02:55:07PM +0100, Paul Kocialkowski wrote:
> Hi,
>
> On Sat 16 Jan 21, 21:11, Julia Lawall wrote:
> > From: kernel test robot <lkp@intel.com>
> >
> > PTR_ERR should access the value just tested by IS_ERR
>
> Good catch!
>
> Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Thanks, Julia and Paul.
A patch with similar content got recently merged:
commit 6e7cca2790a54057ddf64da7843271e192f71ca0
Author: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Date: Wed Jan 20 09:42:38 2021 +0100
media: i2c/ov8865.c: fix error checks using wrong variable
Fix two typos: dvdd -> dovdd and dvdd -> avdd
Both clearly copy-and-paste mistakes.
Fixes this smatch warning:
drivers/media/i2c/ov8865.c:2852 ov8865_probe() warn: passing zero to 'PTR_ERR'
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
--
Kind regards,
Sakari Ailus
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] media: i2c: fix odd_ptr_err.cocci warnings
@ 2021-02-01 13:04 ` Sakari Ailus
0 siblings, 0 replies; 6+ messages in thread
From: Sakari Ailus @ 2021-02-01 13:04 UTC (permalink / raw)
To: Paul Kocialkowski
Cc: Julia Lawall, Mauro Carvalho Chehab, linux-media,
Kévin L'hôpital, linux-kernel,
Linux Memory Management List, kbuild-all
On Mon, Jan 18, 2021 at 02:55:07PM +0100, Paul Kocialkowski wrote:
> Hi,
>
> On Sat 16 Jan 21, 21:11, Julia Lawall wrote:
> > From: kernel test robot <lkp@intel.com>
> >
> > PTR_ERR should access the value just tested by IS_ERR
>
> Good catch!
>
> Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Thanks, Julia and Paul.
A patch with similar content got recently merged:
commit 6e7cca2790a54057ddf64da7843271e192f71ca0
Author: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Date: Wed Jan 20 09:42:38 2021 +0100
media: i2c/ov8865.c: fix error checks using wrong variable
Fix two typos: dvdd -> dovdd and dvdd -> avdd
Both clearly copy-and-paste mistakes.
Fixes this smatch warning:
drivers/media/i2c/ov8865.c:2852 ov8865_probe() warn: passing zero to 'PTR_ERR'
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
--
Kind regards,
Sakari Ailus
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-02-01 13:06 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-16 20:11 [PATCH] media: i2c: fix odd_ptr_err.cocci warnings Julia Lawall
2021-01-16 20:11 ` Julia Lawall
2021-01-18 13:55 ` Paul Kocialkowski
2021-02-01 13:04 ` Sakari Ailus
2021-02-01 13:04 ` Sakari Ailus
-- strict thread matches above, loose matches on Subject: below --
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 odd_ptr_err.cocci warnings kernel test robot
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.