summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/selftests
diff options
context:
space:
mode:
authorMatthew Auld <matthew.auld@intel.com>2019-08-15 11:32:10 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2019-08-15 13:13:23 +0100
commit6f6333ba501e2bf4d040c30c618e9b313e114761 (patch)
tree8dcd5db785baa367d836febb0bef57fd4bc68bbd /drivers/gpu/drm/i915/selftests
parent88f8065ca73ff8d374fe640e651bc3d37ddc1954 (diff)
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 <dan.carpenter@oracle.com> Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Dan Carpenter <dan.carpenter@oracle.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20190815103210.11802-1-matthew.auld@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/selftests')
-rw-r--r--drivers/gpu/drm/i915/selftests/i915_buddy.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/selftests/i915_buddy.c b/drivers/gpu/drm/i915/selftests/i915_buddy.c
index b839dd99dd1f..23f784eae1e7 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) {