drm/i915: Don't call sg_free_table() if sg_alloc_table() fails
Subsystems (2)
PATCH 1/1 drm/i915: Don't call sg_free_table() if sg_alloc_table() fails
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 <[email protected]>
--- drivers/gpu/drm/i915/i915_gem.c | 1 - 1 file changed, 1 deletion(-)
drivers/gpu/drm/i915/i915_gem.c +0 -1
@@ -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 ; }
Signature · 1 line
1.8.3.1
Quoted 4 lines · Damien Lespiau
One needs to call
__sg_free_table()if__sg_alloc_table()fails, butsg_alloc_table()does that for us already.Signed-off-by Damien Lespiau <[email protected]>
Reviewd-by Chris Wilson <[email protected]>
-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Daniel Vetter
AppliedQuoted 6 lines · Chris Wilson
Quoted 4 lines · Damien Lespiau
One needs to call
__sg_free_table()if__sg_alloc_table()fails, butsg_alloc_table()does that for us already.Signed-off-by Damien Lespiau <[email protected]>Reviewd-by Chris Wilson <[email protected]>
Queued for -next, thanks for the patch.
-Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch