]> Git Repo - linux.git/commitdiff
drm/amd/pm: Fix the return value in default case
authorMa Jun <[email protected]>
Wed, 18 Oct 2023 07:17:40 +0000 (15:17 +0800)
committerAlex Deucher <[email protected]>
Thu, 26 Oct 2023 22:41:21 +0000 (18:41 -0400)
Fix the return value in default case and drop
redundant 'break'.

Signed-off-by: Ma Jun <[email protected]>
Reviewed-by: Kenneth Feng <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c

index a0b8d5d78bebd0bcfd46c98c961b9c6e5c0c473c..9f86c1fecbb133667c4c02af93a1854177d56c5e 100644 (file)
@@ -2435,7 +2435,6 @@ int smu_get_power_limit(void *handle,
                break;
        default:
                return -EOPNOTSUPP;
-               break;
        }
 
        switch (pp_limit_level) {
@@ -2453,7 +2452,6 @@ int smu_get_power_limit(void *handle,
                break;
        default:
                return -EOPNOTSUPP;
-               break;
        }
 
        if (limit_type != SMU_DEFAULT_PPT_LIMIT) {
@@ -2487,7 +2485,7 @@ int smu_get_power_limit(void *handle,
                        *limit = smu->min_power_limit;
                        break;
                default:
-                       break;
+                       return -EINVAL;
                }
        }
 
This page took 0.075215 seconds and 4 git commands to generate.