dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/panfrost: fix odd_ptr_err.cocci warnings
@ 2019-04-01 19:36 Julia Lawall
  0 siblings, 0 replies; only message in thread
From: Julia Lawall @ 2019-04-01 19:36 UTC (permalink / raw)
  To: Neil Armstrong
  Cc: Rob Herring, David Airlie, Daniel Vetter, Marty E. Plummer,
	Tomeu Vizoso, dri-devel, linux-kernel, kbuild-all

From: kbuild 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: 10f21de123ac ("drm/panfrost: add support for reset lines")
CC: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git panfrost-rebase-v2
head:   10f21de123ac13b8c257528b0b1222ebb5650510
commit: 10f21de123ac13b8c257528b0b1222ebb5650510 [7/7] drm/panfrost: add support for reset lines
:::::: branch date: 10 hours ago
:::::: commit date: 10 hours ago

Please take the patch only if it's a positive warning. Thanks!

 panfrost_device.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/gpu/drm/panfrost/panfrost_device.c
+++ b/drivers/gpu/drm/panfrost/panfrost_device.c
@@ -21,7 +21,8 @@ static int panfrost_reset_init(struct pa

 	pfdev->rstc = devm_reset_control_array_get(pfdev->dev, false, true);
 	if (IS_ERR(pfdev->rstc)) {
-		dev_err(pfdev->dev, "get reset failed %ld\n", PTR_ERR(pfdev->clock));
+		dev_err(pfdev->dev, "get reset failed %ld\n",
+			PTR_ERR(pfdev->rstc));
 		return PTR_ERR(pfdev->rstc);
 	}

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-04-01 19:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-01 19:36 [PATCH] drm/panfrost: fix odd_ptr_err.cocci warnings Julia Lawall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox