summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorDamien Lespiau <damien.lespiau@intel.com>2013-08-30 15:39:26 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-09-03 19:18:00 +0200
commitd2933a5b8f8f11cbdf9d2e44f0c7c7abeeb64e6b (patch)
treef73d64a2d991def483e6db76c30b5d7e7d5c08ac /drivers/gpu
parent81b5c7bc8de3e6f63419139c2fc91bf81dea8a7d (diff)
downloadlinux-d2933a5b8f8f11cbdf9d2e44f0c7c7abeeb64e6b.tar.gz
linux-d2933a5b8f8f11cbdf9d2e44f0c7c7abeeb64e6b.tar.bz2
linux-d2933a5b8f8f11cbdf9d2e44f0c7c7abeeb64e6b.zip
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 <damien.lespiau@intel.com> Reviewd-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 61313054fce6..f21a0c36a40b 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1774,7 +1774,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;
}