From: Dan Carpenter Date: Thu, 22 Mar 2012 06:30:56 +0000 (+0300) Subject: drm/udl: unlock before returning in udl_gem_mmap() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ace281e8ab62e026b95c413db5f3c6beed42b829;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Dave Airlie --- 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)