summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/pm
diff options
context:
space:
mode:
authorJesse Zhang <jesse.zhang@amd.com>2024-05-09 17:33:20 +0800
committerAlex Deucher <alexander.deucher@amd.com>2024-05-13 16:11:52 -0400
commitd1dd0802b3fc975c2277558d686d3519e3ccf952 (patch)
tree9ef9151512b2f50d1fca118af0c8503d4ad9aae7 /drivers/gpu/drm/amd/pm
parent7cda0a90426e0d6448789d97760555ee9ed1750b (diff)
drm/amd/pm: fix get dpm level count for yello carp
For invalid clk types, return -EINVAL to check the return. Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com> Reviewed-by: Yifan Zhang <yifan1.zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/pm')
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c
index 5917c88cc87d..260c339f89c5 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c
@@ -777,7 +777,7 @@ static int yellow_carp_get_dpm_level_count(struct smu_context *smu,
*count = clk_table->NumDfPstatesEnabled;
break;
default:
- break;
+ return -EINVAL;
}
return 0;