aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Zhang <[email protected]>2024-05-09 09:20:24 +0000
committerAlex Deucher <[email protected]>2024-05-13 20:11:52 +0000
commit7fc7db824cd4785c91ed5ca14711ae55d12e9610 (patch)
treed273b823919f77a5dd032e6f95a8b4e6cfe41c9b
parentdrm/amdgpu: Fix the warning division or modulo by zero (diff)
downloadkernel-7fc7db824cd4785c91ed5ca14711ae55d12e9610.tar.gz
kernel-7fc7db824cd4785c91ed5ca14711ae55d12e9610.zip
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 <[email protected]> Reviewed-by: Yifan Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
-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;