All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Don't call sg_free_table() if sg_alloc_table() fails
@ 2013-08-30 14:39 Damien Lespiau
  2013-08-30 16:00 ` Chris Wilson
  0 siblings, 1 reply; 3+ messages in thread
From: Damien Lespiau @ 2013-08-30 14:39 UTC (permalink / raw)
  To: intel-gfx

One needs to call __sg_free_table() if __sg_alloc_table() fails, but
sg_alloc_table() does that for us already.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 drivers/gpu/drm/i915/i915_gem.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index f705314..8eb8e17 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1772,7 +1772,6 @@ i915_gem_object_get_pages_gtt(struct drm_i915_gem_object *obj)
 
 	page_count = obj->base.size / PAGE_SIZE;
 	if (sg_alloc_table(st, page_count, GFP_KERNEL)) {
-		sg_free_table(st);
 		kfree(st);
 		return -ENOMEM;
 	}
-- 
1.8.3.1

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

end of thread, other threads:[~2013-09-02  6:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-30 14:39 [PATCH] drm/i915: Don't call sg_free_table() if sg_alloc_table() fails Damien Lespiau
2013-08-30 16:00 ` Chris Wilson
2013-09-02  6:23   ` Daniel Vetter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.