drm/amdgpu/powerplay/psm: return an error in power state init
Rather than just silently dropping it. Also fixes a set but unused variable warning. Reviewed-by: Evan Quan <evan.quan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
9805e1adab
commit
902bc65de0
1 changed files with 7 additions and 0 deletions
|
@ -74,6 +74,13 @@ int psm_init_power_state_table(struct pp_hwmgr *hwmgr)
|
||||||
|
|
||||||
for (i = 0; i < table_entries; i++) {
|
for (i = 0; i < table_entries; i++) {
|
||||||
result = hwmgr->hwmgr_func->get_pp_table_entry(hwmgr, i, state);
|
result = hwmgr->hwmgr_func->get_pp_table_entry(hwmgr, i, state);
|
||||||
|
if (result) {
|
||||||
|
kfree(hwmgr->request_ps);
|
||||||
|
kfree(hwmgr->ps);
|
||||||
|
hwmgr->request_ps = NULL;
|
||||||
|
hwmgr->ps = NULL;
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
if (state->classification.flags & PP_StateClassificationFlag_Boot) {
|
if (state->classification.flags & PP_StateClassificationFlag_Boot) {
|
||||||
hwmgr->boot_ps = state;
|
hwmgr->boot_ps = state;
|
||||||
|
|
Loading…
Add table
Reference in a new issue