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@amd.com>
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Ma Jun 2023-10-18 15:17:40 +08:00 committed by Alex Deucher
parent 8eece69ace
commit d8da213478

View 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;
}
}