summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/pm
diff options
context:
space:
mode:
authorJesse Zhang <jesse.zhang@amd.com>2024-05-09 17:20:24 +0800
committerAlex Deucher <alexander.deucher@amd.com>2024-05-13 16:11:52 -0400
commit7fc7db824cd4785c91ed5ca14711ae55d12e9610 (patch)
treed273b823919f77a5dd032e6f95a8b4e6cfe41c9b /drivers/gpu/drm/amd/pm
parent1a00f2ac82d6bc6689388c7edcd2a4bd82664f3c (diff)
drm/amd/pm: fix get dpm level count for smu13
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/smu_v13_0_5_ppt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c
index 59854465d711..9c2c43bfed0b 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c
@@ -643,7 +643,7 @@ static int smu_v13_0_5_get_dpm_level_count(struct smu_context *smu,
*count = clk_table->NumDfPstatesEnabled;
break;
default:
- break;
+ return -EINVAL;
}
return 0;