Commit ace281e8 authored by Dan Carpenter's avatar Dan Carpenter Committed by Dave Airlie

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent c4c7f314
...@@ -234,7 +234,7 @@ int udl_gem_mmap(struct drm_file *file, struct drm_device *dev, ...@@ -234,7 +234,7 @@ int udl_gem_mmap(struct drm_file *file, struct drm_device *dev,
ret = udl_gem_get_pages(gobj, GFP_KERNEL); ret = udl_gem_get_pages(gobj, GFP_KERNEL);
if (ret) if (ret)
return ret; goto out;
if (!gobj->base.map_list.map) { if (!gobj->base.map_list.map) {
ret = drm_gem_create_mmap_offset(obj); ret = drm_gem_create_mmap_offset(obj);
if (ret) if (ret)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment