Commit debd629a authored by Lijo Lazar's avatar Lijo Lazar Committed by Alex Deucher
Browse files

drm/amd/pm: Correct msg status check for powerlimit



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

Signed-off-by: default avatarLijo Lazar <lijo.lazar@amd.com>
Reviewed-by: default avatarEvan Quan <evan.quan@amd.com>
Reviewed-by: default avatarKevin Wang <kevin1.wang@amd.com&gt;`>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 6be64246
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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!");