Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: 3d81d589d6e3 ("drm/i915: Test exhaustion of the mmap space")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20200228141413.qfjf4abr323drlo4@kili.mountain

authored by

Dan Carpenter and committed by
Chris Wilson
efbf9288 3c75050e

+1 -1
+1 -1
drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c
··· 570 570 571 571 obj = i915_gem_object_create_internal(i915, size); 572 572 if (IS_ERR(obj)) 573 - return PTR_ERR(obj); 573 + return false; 574 574 575 575 mmo = mmap_offset_attach(obj, I915_MMAP_OFFSET_GTT, NULL); 576 576 i915_gem_object_put(obj);