drm/amdgpu/pm: Fix the null pointer dereference in apply_state_adjust_rules
authorMa Jun <Jun.Ma2@amd.com>
Thu, 9 May 2024 07:51:35 +0000 (15:51 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 17 May 2024 21:40:36 +0000 (17:40 -0400)
commitd19fb10085a49b77578314f69fff21562f7cd054
treee44428022694d36d6cfe163d455f5203f0473914
parentb2aa3d4b3048598e665230e2da46a62ad1f48d52
drm/amdgpu/pm: Fix the null pointer dereference in apply_state_adjust_rules

Check the pointer value to fix potential null pointer
dereference

Acked-by: Yang Wang<kevinyang.wang@amd.com>
Signed-off-by: Ma Jun <Jun.Ma2@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu8_hwmgr.c
drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c