summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/udl
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2012-03-22 09:30:56 +0300
committerDave Airlie <airlied@redhat.com>2012-05-29 11:02:50 +0100
commitace281e8ab62e026b95c413db5f3c6beed42b829 (patch)
treeb1c4c68d277a8d2ee328335ae8e36668e83cadba /drivers/gpu/drm/udl
parentc4c7f3149ba0b510047cb95d10f26ae1f6b89bc7 (diff)
downloadlinux-ace281e8ab62e026b95c413db5f3c6beed42b829.tar.bz2
drm/udl: unlock before returning in udl_gem_mmap()
If we hit an error here, then we should unlock and unreference obj before returning. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/udl')
-rw-r--r--drivers/gpu/drm/udl/udl_gem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/udl/udl_gem.c b/drivers/gpu/drm/udl/udl_gem.c
index 40efd32f7dce..d9609e2a4d8a 100644
--- a/drivers/gpu/drm/udl/udl_gem.c
+++ b/drivers/gpu/drm/udl/udl_gem.c
@@ -234,7 +234,7 @@ int udl_gem_mmap(struct drm_file *file, struct drm_device *dev,
ret = udl_gem_get_pages(gobj, GFP_KERNEL);
if (ret)
- return ret;
+ goto out;
if (!gobj->base.map_list.map) {
ret = drm_gem_create_mmap_offset(obj);
if (ret)