[Intel-xe] [PATCH] drm/xe: fix error handling flow when device probing fails

Rodrigo Vivi rodrigo.vivi at intel.com
Wed Aug 30 20:55:10 UTC 2023


On Wed, Aug 30, 2023 at 09:33:32AM +0300, Koby Elbaz wrote:
> Upon device probe failure, rolling back the initialization
> should be done in reversed order.
> 
> Signed-off-by: Koby Elbaz <kelbaz at habana.ai>
> Reviewed-by: Ohad Sharabi <osharabi at habana.ai>

pushed to drm-xe-next.
Thanks for the patch.

> ---
>  drivers/gpu/drm/xe/xe_device.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
> index 766df07de979..109aeb25d19c 100644
> --- a/drivers/gpu/drm/xe/xe_device.c
> +++ b/drivers/gpu/drm/xe/xe_device.c
> @@ -325,11 +325,11 @@ int xe_device_probe(struct xe_device *xe)
>  
>  	err = xe_display_init(xe);
>  	if (err)
> -		goto err_fini_display;
> +		goto err_irq_shutdown;
>  
>  	err = drm_dev_register(&xe->drm, 0);
>  	if (err)
> -		goto err_irq_shutdown;
> +		goto err_fini_display;
>  
>  	xe_display_register(xe);
>  
> -- 
> 2.34.1
> 


More information about the Intel-xe mailing list