diff options
| author | Jesse Zhang <[email protected]> | 2024-05-09 09:20:24 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2024-05-13 20:11:52 +0000 |
| commit | 7fc7db824cd4785c91ed5ca14711ae55d12e9610 (patch) | |
| tree | d273b823919f77a5dd032e6f95a8b4e6cfe41c9b | |
| parent | drm/amdgpu: Fix the warning division or modulo by zero (diff) | |
| download | kernel-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.c | 2 |
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; |
