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

* Re: [PATCH] drm/i915: Don't call sg_free_table() if sg_alloc_table() fails
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Wilson @ 2013-08-30 16:00 UTC (permalink / raw)
  To: Damien Lespiau; +Cc: intel-gfx

On Fri, Aug 30, 2013 at 03:39:26PM +0100, Damien Lespiau wrote:
> 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>
Reviewd-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

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

* Re: [PATCH] drm/i915: Don't call sg_free_table() if sg_alloc_table() fails
  2013-08-30 16:00 ` Chris Wilson
@ 2013-09-02  6:23   ` Daniel Vetter
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Vetter @ 2013-09-02  6:23 UTC (permalink / raw)
  To: Chris Wilson, Damien Lespiau, intel-gfx

On Fri, Aug 30, 2013 at 05:00:55PM +0100, Chris Wilson wrote:
> On Fri, Aug 30, 2013 at 03:39:26PM +0100, Damien Lespiau wrote:
> > 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>
> Reviewd-by: Chris Wilson <chris@chris-wilson.co.uk>

Queued for -next, thanks for the patch.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[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.