public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Matthew Auld <matthew.auld@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Subject: [PATCH] drm/i915/selftest/buddy: fixup igt_buddy_alloc_range
Date: Thu, 15 Aug 2019 11:32:10 +0100	[thread overview]
Message-ID: <20190815103210.11802-1-matthew.auld@intel.com> (raw)

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

             reply	other threads:[~2019-08-15 10:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-15 10:32 Matthew Auld [this message]
2019-08-15 11:10 ` [PATCH] drm/i915/selftest/buddy: fixup igt_buddy_alloc_range Chris Wilson
2019-08-15 12:33 ` ✓ Fi.CI.BAT: success for " Patchwork
2019-08-16  4:57 ` ✓ Fi.CI.IGT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190815103210.11802-1-matthew.auld@intel.com \
    --to=matthew.auld@intel.com \
    --cc=dan.carpenter@oracle.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox