linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: i2c: fix odd_ptr_err.cocci warnings
@ 2021-01-16 20:11 Julia Lawall
  2021-01-18 13:55 ` Paul Kocialkowski
  0 siblings, 1 reply; 3+ 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] 3+ messages in thread

end of thread, other threads:[~2021-02-01 13:06 UTC | newest]

Thread overview: 3+ 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-18 13:55 ` Paul Kocialkowski
2021-02-01 13:04   ` Sakari Ailus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).