drm/i915/selftests: fix inconsistent IS_ERR and PTR_ERR
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Wed, 14 Feb 2018 21:12:34 +0000 (15:12 -0600)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 15 Feb 2018 16:33:30 +0000 (16:33 +0000)
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>
Link: https://patchwork.freedesktop.org/patch/msgid/20180214211234.GA22341@embeddedgus
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c

index d806427..89b6ca9 100644 (file)
@@ -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;
                }