drm/amd/pm: Fix the return value in default case
Subsystems (3)
PATCH 1/1 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 <[email protected]>
--- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +1 -3
@@ -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 ; } }
Signature · 1 line
2.34.1
[AMD Official Use Only - General]
Reviewed-by Kenneth Feng <[email protected]>
-----Original Message-----
From: Ma, Jun <[email protected]>
Sent: Thursday, October 19, 2023 10:29 AM
To: [email protected]; Feng, Kenneth <[email protected]>; Deucher, Alexander <[email protected]>
Cc: Ma, Jun <[email protected]>; Ma, Jun <[email protected]>
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 <[email protected]>
--- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +0 -2
@@ -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