[patch] drm/udl: unlock before returning in udl_gem_mmap()

Dan Carpenter dan.carpenter at oracle.com
Thu May 24 04:00:41 PDT 2012


On Thu, Mar 22, 2012 at 09:30:56AM +0300, Dan Carpenter wrote:
> If we hit an error here, then we should unlock and unreference obj
> before returning.
> 

This is still present in linux-next.

regards,
dan carpenter

> Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>
> 
> diff --git a/drivers/gpu/drm/udl/udl_gem.c b/drivers/gpu/drm/udl/udl_gem.c
> index 852642d..6de6130 100644
> --- a/drivers/gpu/drm/udl/udl_gem.c
> +++ b/drivers/gpu/drm/udl/udl_gem.c
> @@ -210,7 +210,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)


More information about the dri-devel mailing list