From: Lijo Lazar <lijo.lazar@xxxxxxx> Status 0 indicates success, fix the check before using PPTable limit Signed-off-by: Lijo Lazar <lijo.lazar@xxxxxxx> Reviewed-by: Evan Quan <evan.quan@xxxxxxx> Reviewed-by: Kevin Wang <kevin1.wang@xxxxxxx>` Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx> --- 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@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/amd-gfx