[Intel-xe] [PATCH] drm/xe: Simplify final return from xe_irq_install()

Matt Roper matthew.d.roper at intel.com
Fri Sep 15 22:25:32 UTC 2023


On Fri, Sep 15, 2023 at 07:02:33PM -0300, Gustavo Sousa wrote:
> At the end of the function, we will always return err no matter it's
> value. Simplify this by just returning the result of
> drmm_add_action_or_reset().
> 
> Signed-off-by: Gustavo Sousa <gustavo.sousa at intel.com>

Reviewed-by: Matt Roper <matthew.d.roper at intel.com>

> ---
>  drivers/gpu/drm/xe/xe_irq.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_irq.c b/drivers/gpu/drm/xe/xe_irq.c
> index 3f34c507ff59..ccb934f8fa34 100644
> --- a/drivers/gpu/drm/xe/xe_irq.c
> +++ b/drivers/gpu/drm/xe/xe_irq.c
> @@ -603,11 +603,7 @@ int xe_irq_install(struct xe_device *xe)
>  
>  	xe_irq_postinstall(xe);
>  
> -	err = drmm_add_action_or_reset(&xe->drm, irq_uninstall, xe);
> -	if (err)
> -		return err;
> -
> -	return err;
> +	return drmm_add_action_or_reset(&xe->drm, irq_uninstall, xe);
>  }
>  
>  void xe_irq_shutdown(struct xe_device *xe)
> -- 
> 2.42.0
> 

-- 
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation


More information about the Intel-xe mailing list