All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
To: Jani Nikula <jani.nikula@linux.intel.com>,
	Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>,
	David Airlie <airlied@linux.ie>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org,
	"Gustavo A. R. Silva" <garsilva@embeddedor.com>
Subject: [PATCH] drm/i915/selftests: fix inconsistent IS_ERR and PTR_ERR
Date: Wed, 14 Feb 2018 15:12:34 -0600	[thread overview]
Message-ID: <20180214211234.GA22341@embeddedgus> (raw)

Fix inconsistent IS_ERR and PTR_ERR in shrink_boom.
The proper pointer to use is _explode_ instead of _purge_.

This issue was detected with the help of Coccinelle.

Fixes: fe215c8bc426 ("drm/i915/selftests: add missing gtt shrinker test")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
index d806427..89b6ca9 100644
--- a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
@@ -927,7 +927,7 @@ static int shrink_boom(struct drm_i915_private *i915,
 
 		explode = fake_dma_object(i915, size);
 		if (IS_ERR(explode)) {
-			err = PTR_ERR(purge);
+			err = PTR_ERR(explode);
 			goto err_purge;
 		}
 
-- 
2.7.4

             reply	other threads:[~2018-02-14 21:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-14 21:12 Gustavo A. R. Silva [this message]
2018-02-15  9:13 ` [PATCH] drm/i915/selftests: fix inconsistent IS_ERR and PTR_ERR Jani Nikula
2018-02-15 16:09   ` Gustavo A. R. Silva
2018-02-15 16:34     ` Chris Wilson
2018-02-15 16:34       ` Chris Wilson
  -- strict thread matches above, loose matches on Subject: below --
2021-10-22 12:06 [PATCH] drm/i915/selftests: Fix " Kai Song
2021-10-25  8:01 ` Matthew Auld

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180214211234.GA22341@embeddedgus \
    --to=gustavo@embeddedor.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=garsilva@embeddedor.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rodrigo.vivi@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.