Commit efbf9288 authored by Dan Carpenter's avatar Dan Carpenter Committed by Chris Wilson

drm/i915/selftests: Fix return in assert_mmap_offset()

The assert_mmap_offset() returns type bool so if we return an error
pointer that is "return true;" or success.  If we have an error, then
we should return false.

Fixes: 3d81d589 ("drm/i915: Test exhaustion of the mmap space")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20200228141413.qfjf4abr323drlo4@kili.mountain
parent 3c75050e
...@@ -570,7 +570,7 @@ static bool assert_mmap_offset(struct drm_i915_private *i915, ...@@ -570,7 +570,7 @@ static bool assert_mmap_offset(struct drm_i915_private *i915,
obj = i915_gem_object_create_internal(i915, size); obj = i915_gem_object_create_internal(i915, size);
if (IS_ERR(obj)) if (IS_ERR(obj))
return PTR_ERR(obj); return false;
mmo = mmap_offset_attach(obj, I915_MMAP_OFFSET_GTT, NULL); mmo = mmap_offset_attach(obj, I915_MMAP_OFFSET_GTT, NULL);
i915_gem_object_put(obj); i915_gem_object_put(obj);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment