Skip to content

Commit 98e92fc

Browse files
Peter Shkenevgregkh
authored andcommitted
drm/amdgpu: check if hubbub is NULL in debugfs/amdgpu_dm_capabilities
commit b4a69f7 upstream. 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: Peter Shkenev <mustela@erminea.space> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 35a37af commit 98e92fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3988,7 +3988,7 @@ static int capabilities_show(struct seq_file *m, void *unused)
39883988

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

3991-
if (hubbub->funcs->get_mall_en)
3991+
if (hubbub && hubbub->funcs->get_mall_en)
39923992
hubbub->funcs->get_mall_en(hubbub, &mall_in_use);
39933993

39943994
if (dc->cap_funcs.get_subvp_en)

0 commit comments

Comments
 (0)