drm/udl: unlock before returning in udl_gem_mmap()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 22 Mar 2012 06:30:56 +0000 (09:30 +0300)
committerDave Airlie <airlied@redhat.com>
Tue, 29 May 2012 10:02:50 +0000 (11:02 +0100)
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>
drivers/gpu/drm/udl/udl_gem.c

index 40efd32f7dce85f0d45e8fce92cc64ea1e11990e..d9609e2a4d8afc7217e3a50912d93200324baef8 100644 (file)
@@ -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)