From: Matthew Auld Date: Thu, 15 Aug 2019 10:32:10 +0000 (+0100) Subject: drm/i915/selftest/buddy: fixup igt_buddy_alloc_range X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=6f6333ba501e2bf4d040c30c618e9b313e114761;p=linux.git drm/i915/selftest/buddy: fixup igt_buddy_alloc_range Dan reported the following static checker warning: drivers/gpu/drm/i915/selftests/i915_buddy.c:670 igt_buddy_alloc_range() error: we previously assumed 'block' could be null (see line 665) Reported-by: Dan Carpenter Signed-off-by: Matthew Auld Cc: Dan Carpenter Cc: Chris Wilson Reviewed-by: Dan Carpenter Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190815103210.11802-1-matthew.auld@intel.com --- diff --git a/drivers/gpu/drm/i915/selftests/i915_buddy.c b/drivers/gpu/drm/i915/selftests/i915_buddy.c index b839dd99dd1f3..23f784eae1e7d 100644 --- a/drivers/gpu/drm/i915/selftests/i915_buddy.c +++ b/drivers/gpu/drm/i915/selftests/i915_buddy.c @@ -665,6 +665,7 @@ static int igt_buddy_alloc_range(void *arg) if (!block) { pr_err("alloc_range has no blocks\n"); err = -EINVAL; + break; } if (i915_buddy_block_offset(block) != offset) {