Commit b4a69f7f authored by Peter Shkenev's avatar Peter Shkenev Committed by Alex Deucher
Browse files

drm/amdgpu: check if hubbub is NULL in debugfs/amdgpu_dm_capabilities



HUBBUB structure is not initialized on DCE hardware, so check if it is NULL
to avoid null dereference while accessing amdgpu_dm_capabilities file in
debugfs.

Signed-off-by: default avatarPeter Shkenev <mustela@erminea.space>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
parent c90f2e11
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3988,7 +3988,7 @@ static int capabilities_show(struct seq_file *m, void *unused)

	struct hubbub *hubbub = dc->res_pool->hubbub;

	if (hubbub->funcs->get_mall_en)
	if (hubbub && hubbub->funcs->get_mall_en)
		hubbub->funcs->get_mall_en(hubbub, &mall_in_use);

	if (dc->cap_funcs.get_subvp_en)