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
Subject: [PATCH] drm/i915: initialize ret in i915_gem_evict_something
Date: Thu,  5 Jan 2017 14:41:31 +0000	[thread overview]
Message-ID: <1483627291-7532-1-git-send-email-matthew.auld@intel.com> (raw)

If we find a suitable victim node on our first pass, then ret
will be uninitialized which could lead to some funny business later.

Fixes: 9332f3b1b99a ("drm/i915: Combine loops within i915_gem_evict_something")
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
---
 drivers/gpu/drm/i915/i915_gem_evict.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_evict.c b/drivers/gpu/drm/i915/i915_gem_evict.c
index 50129ec1caab..19716548c455 100644
--- a/drivers/gpu/drm/i915/i915_gem_evict.c
+++ b/drivers/gpu/drm/i915/i915_gem_evict.c
@@ -109,7 +109,7 @@ i915_gem_evict_something(struct i915_address_space *vm,
 	}, **phase;
 	struct i915_vma *vma, *next;
 	struct drm_mm_node *node;
-	int ret;
+	int ret = 0;
 
 	lockdep_assert_held(&vm->i915->drm.struct_mutex);
 	trace_i915_gem_evict(vm, min_size, alignment, flags);
-- 
2.7.4

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

             reply	other threads:[~2017-01-05 14:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-05 14:41 Matthew Auld [this message]
2017-01-05 15:13 ` [PATCH] drm/i915: initialize ret in i915_gem_evict_something Chris Wilson
2017-01-05 15:26   ` Matthew Auld
2017-01-05 15:59     ` [PATCH] drm/i915: Clear ret before unbinding in i915_gem_evict_something() Chris Wilson
2017-01-05 16:33       ` Chris Wilson
2017-01-05 16:36         ` Matthew Auld
2017-01-05 16:49           ` Chris Wilson
2017-01-05 15:29 ` ✓ Fi.CI.BAT: success for drm/i915: initialize ret in i915_gem_evict_something Patchwork
2017-01-05 16:53 ` ✗ Fi.CI.BAT: warning for drm/i915: initialize ret in i915_gem_evict_something (rev2) 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=1483627291-7532-1-git-send-email-matthew.auld@intel.com \
    --to=matthew.auld@intel.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