mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 19:56:18 +00:00
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>
This commit is contained in:
parent
ecabd32a62
commit
51f07b7ebc
1 changed files with 2 additions and 1 deletions
|
@ -351,9 +351,10 @@ int radeon_gem_get_tiling_ioctl(struct drm_device *dev, void *data,
|
||||||
rbo = gobj->driver_private;
|
rbo = gobj->driver_private;
|
||||||
r = radeon_bo_reserve(rbo, false);
|
r = radeon_bo_reserve(rbo, false);
|
||||||
if (unlikely(r != 0))
|
if (unlikely(r != 0))
|
||||||
return r;
|
goto out;
|
||||||
radeon_bo_get_tiling_flags(rbo, &args->tiling_flags, &args->pitch);
|
radeon_bo_get_tiling_flags(rbo, &args->tiling_flags, &args->pitch);
|
||||||
radeon_bo_unreserve(rbo);
|
radeon_bo_unreserve(rbo);
|
||||||
|
out:
|
||||||
mutex_lock(&dev->struct_mutex);
|
mutex_lock(&dev->struct_mutex);
|
||||||
drm_gem_object_unreference(gobj);
|
drm_gem_object_unreference(gobj);
|
||||||
mutex_unlock(&dev->struct_mutex);
|
mutex_unlock(&dev->struct_mutex);
|
||||||
|
|
Loading…
Reference in a new issue