From: Lijo Lazar <lijo.la...@amd.com>

Status 0 indicates success, fix the check before using PPTable limit

Signed-off-by: Lijo Lazar <lijo.la...@amd.com>
Reviewed-by: Evan Quan <evan.q...@amd.com>
Reviewed-by: Kevin Wang <kevin1.w...@amd.com>`
Signed-off-by: Alex Deucher <alexander.deuc...@amd.com>
---
 drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c 
b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
index 629523858660..df94604edd97 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
@@ -1072,7 +1072,7 @@ static int aldebaran_get_power_limit(struct smu_context 
*smu)
 
        ret = smu_cmn_send_smc_msg(smu, SMU_MSG_GetPptLimit, &power_limit);
 
-       if (!ret) {
+       if (ret) {
                /* the last hope to figure out the ppt limit */
                if (!pptable) {
                        dev_err(smu->adev->dev, "Cannot get PPT limit due to 
pptable missing!");
-- 
2.29.2

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to