[Intel-gfx] [PATCH] drm: Remove unused drm_device from drm_gem_object_lookup()

Emil Velikov emil.l.velikov at gmail.com
Mon May 16 22:15:09 UTC 2016


Hi Chris,

On 9 May 2016 at 11:04, Chris Wilson <chris at chris-wilson.co.uk> wrote:

> --- a/drivers/gpu/drm/drm_gem.c
> +++ b/drivers/gpu/drm/drm_gem.c

> @@ -607,12 +606,8 @@ drm_gem_object_lookup(struct drm_device *dev, struct drm_file *filp,
>
>         /* Check if we currently have a reference on the object */
>         obj = idr_find(&filp->object_idr, handle);
> -       if (obj == NULL) {
> -               spin_unlock(&filp->table_lock);
> -               return NULL;
> -       }
> -
> -       drm_gem_object_reference(obj);
> +       if (obj)
> +               drm_gem_object_reference(obj);
>
This hunk looks unrelated to the goal of the patch. Still a nice
cleanup though. Worth splitting out ?

-Emil


More information about the Intel-gfx mailing list