From: Dave Airlie <airl...@redhat.com> Not sure it ever happens in practice, spotted during code review.
Signed-off-by: Dave Airlie <airl...@redhat.com> --- drivers/gpu/drm/radeon/radeon_gem.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_gem.c b/drivers/gpu/drm/radeon/radeon_gem.c index ee827cc..8bf7432 100644 --- a/drivers/gpu/drm/radeon/radeon_gem.c +++ b/drivers/gpu/drm/radeon/radeon_gem.c @@ -350,10 +350,11 @@ int radeon_gem_get_tiling_ioctl(struct drm_device *dev, void *data, return -EINVAL; rbo = gobj->driver_private; r = radeon_bo_reserve(rbo, false); - if (unlikely(r != 0)) - return r; + if (unlikely(r != 0)) { + 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); -- 1.6.5.2 ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev -- _______________________________________________ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel