drm/amd/pm: check specific index for smu13
authorjsg <jsg@openbsd.org>
Mon, 9 Sep 2024 09:35:48 +0000 (09:35 +0000)
committerjsg <jsg@openbsd.org>
Mon, 9 Sep 2024 09:35:48 +0000 (09:35 +0000)
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

index aee973f..e736a88 100644 (file)
@@ -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);