public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/selftest/buddy: fixup igt_buddy_alloc_range
@ 2019-08-15 10:32 Matthew Auld
  2019-08-15 11:10 ` Chris Wilson
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Matthew Auld @ 2019-08-15 10:32 UTC (permalink / raw)
  To: intel-gfx; +Cc: Dan Carpenter

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>
---
 drivers/gpu/drm/i915/selftests/i915_buddy.c | 1 +
 1 file changed, 1 insertion(+)

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) {
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-08-16  4:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-15 10:32 [PATCH] drm/i915/selftest/buddy: fixup igt_buddy_alloc_range Matthew Auld
2019-08-15 11:10 ` Chris Wilson
2019-08-15 12:33 ` ✓ Fi.CI.BAT: success for " Patchwork
2019-08-16  4:57 ` ✓ Fi.CI.IGT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox