[Intel-xe] [PATCH] drm/xe: Initialize ret in mcr_lock()
José Roberto de Souza
jose.souza at intel.com
Thu Feb 16 17:46:16 UTC 2023
ret is not initialized in mcr_lock() when running in platforms with
graphics IP version < 1270, this could cause drm_WARN_ON_ONCE()
to hit eventually(what just happened to me).
Fixes: 62a813fa315e ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Signed-off-by: José Roberto de Souza <jose.souza at intel.com>
---
drivers/gpu/drm/xe/xe_gt_mcr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/xe/xe_gt_mcr.c b/drivers/gpu/drm/xe/xe_gt_mcr.c
index bb71071c3435f..7617f03408794 100644
--- a/drivers/gpu/drm/xe/xe_gt_mcr.c
+++ b/drivers/gpu/drm/xe/xe_gt_mcr.c
@@ -383,7 +383,7 @@ static bool xe_gt_mcr_get_nonterminated_steering(struct xe_gt *gt,
static void mcr_lock(struct xe_gt *gt)
{
struct xe_device *xe = gt_to_xe(gt);
- int ret;
+ int ret = 0;
spin_lock(>->mcr_lock);
--
2.39.1
More information about the Intel-xe
mailing list