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:Charles Han <hanchunchao@inspur.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com> Signed-off-by:
Sasha Levin <sashal@kernel.org>
Loading
Please sign in to comment