Skip to content

Commit 71cd6cb

Browse files
Dan Carpenterjnikula
authored andcommitted
drm/i915/selftests: Fix an IS_ERR() vs NULL check
The live_context() function returns error pointers. It never returns NULL. Fixes: 9c1477e ("drm/i915/selftests: Exercise adding requests to a full GGTT") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20190326050843.GA20038@kadam (cherry picked from commit 602cbe8) Signed-off-by: Jani Nikula <jani.nikula@intel.com>
1 parent 4b9a393 commit 71cd6cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/i915/selftests/i915_gem_evict.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ static int igt_evict_contexts(void *arg)
455455
struct i915_gem_context *ctx;
456456

457457
ctx = live_context(i915, file);
458-
if (!ctx)
458+
if (IS_ERR(ctx))
459459
break;
460460

461461
/* We will need some GGTT space for the rq's context */

0 commit comments

Comments
 (0)