summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/pm/powerplay/hwmgr/pp_psm.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2020-12-10 16:55:41 +1000
committerDave Airlie <airlied@redhat.com>2020-12-10 16:55:53 +1000
commitb10733527bfd864605c33ab2e9a886eec317ec39 (patch)
treed7d671d2fa69e628e2ac898ba8e9ab10c6481c3c /drivers/gpu/drm/amd/pm/powerplay/hwmgr/pp_psm.c
parent60f2f74978e69fdb63e7a26179cbd5c50d4845c2 (diff)
parentf8aab60422c371425365d386dfd51e0c6c5b1041 (diff)
downloadlwn-b10733527bfd864605c33ab2e9a886eec317ec39.tar.gz
lwn-b10733527bfd864605c33ab2e9a886eec317ec39.zip
Merge tag 'amd-drm-next-5.11-2020-12-09' of git://people.freedesktop.org/~agd5f/linux into drm-next
amd-drm-next-5.11-2020-12-09: amdgpu: - SR-IOV fixes - Navy Flounder updates - Sienna Cichlid updates - Dimgrey Cavefish updates - Vangogh updates - Misc SMU fixes - Misc display fixes - Last big hunk of W=1 warning fixes - Cursor validation fixes - CI BACO updates From: Alex Deucher <alexdeucher@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20201210045344.21566-1-alexander.deucher@amd.com Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/amd/pm/powerplay/hwmgr/pp_psm.c')
-rw-r--r--drivers/gpu/drm/amd/pm/powerplay/hwmgr/pp_psm.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/pp_psm.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/pp_psm.c
index 31a32a79cfc2..67d7da0b6fed 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/pp_psm.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/pp_psm.c
@@ -74,6 +74,13 @@ int psm_init_power_state_table(struct pp_hwmgr *hwmgr)
for (i = 0; i < table_entries; i++) {
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) {
hwmgr->boot_ps = state;