[PATCH] drm/amd/pm: Fix the return value in default case
Feng, Kenneth
Kenneth.Feng at amd.com
Thu Oct 19 02:37:22 UTC 2023
[AMD Official Use Only - General]
Reviewed-by: Kenneth Feng <kenneth.feng at amd.com>
-----Original Message-----
From: Ma, Jun <Jun.Ma2 at amd.com>
Sent: Thursday, October 19, 2023 10:29 AM
To: amd-gfx at lists.freedesktop.org; Feng, Kenneth <Kenneth.Feng at amd.com>; Deucher, Alexander <Alexander.Deucher at amd.com>
Cc: Ma, Jun <Jun.Ma2 at amd.com>; Ma, Jun <Jun.Ma2 at amd.com>
Subject: [PATCH] drm/amd/pm: Fix the return value in default case
Fix the return value in default case and drop redundant 'break'.
Signed-off-by: Ma Jun <Jun.Ma2 at amd.com>
---
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
index 7087f9840ab7..3b4053e2607b 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
@@ -2434,7 +2434,6 @@ int smu_get_power_limit(void *handle,
break;
default:
return -EOPNOTSUPP;
- break;
}
switch (pp_limit_level) {
@@ -2452,7 +2451,6 @@ int smu_get_power_limit(void *handle,
break;
default:
return -EOPNOTSUPP;
- break;
}
if (limit_type != SMU_DEFAULT_PPT_LIMIT) { @@ -2486,7 +2484,7 @@ int smu_get_power_limit(void *handle,
*limit = smu->min_power_limit;
break;
default:
- break;
+ return -EINVAL;
}
}
--
2.34.1
More information about the amd-gfx
mailing list