Commit 64f3acc8 authored by Charles Han's avatar Charles Han Committed by Greg Kroah-Hartman
Browse files

drm/amd/pp: Fix potential NULL pointer dereference in atomctrl_initialize_mc_reg_table



[ Upstream commit 820116a3 ]

The function atomctrl_initialize_mc_reg_table() and
atomctrl_initialize_mc_reg_table_v2_2() does not check the return
value of smu_atom_get_data_table(). If smu_atom_get_data_table()
fails to retrieve vram_info, it returns NULL which is later
dereferenced.

Fixes: b3892e2b ("drm/amd/pp: Use atombios api directly in powerplay (v2)")
Fixes: 5f92b48c ("drm/amd/pm: add mc register table initialization")
Signed-off-by: default avatarCharles Han <hanchunchao@inspur.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent aba86d49
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment