From 4781d6ed26b7d43b4a108edb0cec62697a9b0d31 Mon Sep 17 00:00:00 2001 From: jsg Date: Mon, 9 Sep 2024 09:35:48 +0000 Subject: [PATCH] drm/amd/pm: check specific index for smu13 From Jesse Zhang 025798f44b8d19c33d48ff85aa5c172dc6576d47 in linux-6.6.y/6.6.50 a3ac9d1c9751f00026c2d98b802ec8a98626c3ed in mainline linux --- sys/dev/pci/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/pci/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c b/sys/dev/pci/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c index aee973f1f69..e736a88ae1a 100644 --- a/sys/dev/pci/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c +++ b/sys/dev/pci/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c @@ -2063,6 +2063,8 @@ static int smu_v13_0_6_mode2_reset(struct smu_context *smu) index = smu_cmn_to_asic_specific_index(smu, CMN2ASIC_MAPPING_MSG, SMU_MSG_GfxDeviceDriverReset); + if (index < 0) + return index; mutex_lock(&smu->message_lock); -- 2.20.1