drm/xe: Initialize ret in mcr_lock()

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: dd08ebf6c3 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
This commit is contained in:
José Roberto de Souza 2023-02-16 06:16:44 -08:00 committed by Rodrigo Vivi
parent 844c0700a6
commit dc97898e81

View File

@ -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(&gt->mcr_lock);