At the start it checks limit_level.
When switching on limit_level, the value of limit_level must be between -1 and 
2.
The switch governing value limit_level cannot reach the default case.

Signed-off-by: Jesse Zhang <jesse.zh...@amd.com>
---
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c 
b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
index 6f742d88867d..0b4193639e65 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
@@ -2754,8 +2754,6 @@ int smu_get_power_limit(void *handle,
                case SMU_PPT_LIMIT_MIN:
                        *limit = smu->min_power_limit;
                        break;
-               default:
-                       return -EINVAL;
                }
        }
 
-- 
2.25.1

Reply via email to