[Intel-xe] [PATCH 2/2] drm/xe: Fix error path in xe_guc_pc_start()

Matthew Brost matthew.brost at intel.com
Fri Aug 4 00:27:04 UTC 2023


On Thu, Aug 03, 2023 at 04:42:09PM -0700, Lucas De Marchi wrote:
> If the forcewake failed, put xe_device_mem_access.
> 
> Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>

Reviewed-by: Matthew Brost <matthew.brost at intel.com>

> ---
>  drivers/gpu/drm/xe/xe_guc_pc.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_guc_pc.c b/drivers/gpu/drm/xe/xe_guc_pc.c
> index 19d743f92f43..c03bb58e7049 100644
> --- a/drivers/gpu/drm/xe/xe_guc_pc.c
> +++ b/drivers/gpu/drm/xe/xe_guc_pc.c
> @@ -825,7 +825,7 @@ int xe_guc_pc_start(struct xe_guc_pc *pc)
>  
>  	ret = xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL);
>  	if (ret)
> -		return ret;
> +		goto out_fail_force_wake;
>  
>  	ret = pc_action_reset(pc);
>  	if (ret)
> @@ -851,6 +851,7 @@ int xe_guc_pc_start(struct xe_guc_pc *pc)
>  
>  out:
>  	XE_WARN_ON(xe_force_wake_put(gt_to_fw(gt), XE_FORCEWAKE_ALL));
> +out_fail_force_wake:
>  	xe_device_mem_access_put(pc_to_xe(pc));
>  	return ret;
>  }
> -- 
> 2.40.1
> 


More information about the Intel-xe mailing list