aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-12-16 13:10:43 +1000
committerDave Airlie <airlied@redhat.com>2009-12-16 15:38:56 +1000
commit51f07b7ebce15c1848743a2ba43a0005375d8243 (patch)
treeb5efb0388671c82bfa549fc2c29cd31a22217b03 /drivers
parentecabd32a623eaf3e4c853ff73f200c8079028000 (diff)
drm/radeon/gem: don't leak a gem object if reserve fails on get tiling (v2)
Not sure it ever happens in practice, spotted during code review. spare brace snuck in Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/radeon/radeon_gem.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_gem.c b/drivers/gpu/drm/radeon/radeon_gem.c
index ee827cc22af..60df2d7e7e4 100644
--- a/drivers/gpu/drm/radeon/radeon_gem.c
+++ b/drivers/gpu/drm/radeon/radeon_gem.c
@@ -351,9 +351,10 @@ int radeon_gem_get_tiling_ioctl(struct drm_device *dev, void *data,
rbo = gobj->driver_private;
r = radeon_bo_reserve(rbo, false);
if (unlikely(r != 0))
- return r;
+ goto out;
radeon_bo_get_tiling_flags(rbo, &args->tiling_flags, &args->pitch);
radeon_bo_unreserve(rbo);
+out:
mutex_lock(&dev->struct_mutex);
drm_gem_object_unreference(gobj);
mutex_unlock(&dev->struct_mutex);