[Intel-gfx] [PATCH 01/22] drm/i915: Report the correct errno from i915_gem_context_open()

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Mon Mar 25 09:24:10 UTC 2019


On 25/03/2019 09:03, Chris Wilson wrote:
> Fixup the errno as we adjusted the error path to receive the errno and
> not computed itself from ERR_PTR(ctx) anymore.
> 
> drivers/gpu/drm/i915/i915_gem_context.c:793 i915_gem_context_open() warn: passing a valid pointer to 'PTR_ERR'
> 
> Fixes: 3aa9945a528e ("drm/i915: Separate GEM context construction and registration to userspace")
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> ---
>   drivers/gpu/drm/i915/i915_gem_context.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c
> index e6f594668245..25f267a03d3d 100644
> --- a/drivers/gpu/drm/i915/i915_gem_context.c
> +++ b/drivers/gpu/drm/i915/i915_gem_context.c
> @@ -709,7 +709,7 @@ int i915_gem_context_open(struct drm_i915_private *i915,
>   	idr_destroy(&file_priv->context_idr);
>   	mutex_destroy(&file_priv->vm_idr_lock);
>   	mutex_destroy(&file_priv->context_idr_lock);
> -	return PTR_ERR(ctx);
> +	return err;
>   }
>   
>   void i915_gem_context_close(struct drm_file *file)
> 

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

Regards,

Tvrtko


More information about the Intel-gfx mailing list