From: Lucas De Marchi Date: Thu, 3 Aug 2023 23:42:09 +0000 (-0700) Subject: drm/xe: Fix error path in xe_guc_pc_start() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=d8b4494bf184d43295b89156d7656d69f931e418;p=linux.git drm/xe: Fix error path in xe_guc_pc_start() If the forcewake failed, put xe_device_mem_access. Reviewed-by: Matthew Brost Link: https://lore.kernel.org/r/20230803234209.881924-2-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi --- diff --git a/drivers/gpu/drm/xe/xe_guc_pc.c b/drivers/gpu/drm/xe/xe_guc_pc.c index 19d743f92f438..c03bb58e70497 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; }