Skip to content

Commit b4a69f7

Browse files
Peter Shkenevalexdeucher
authored andcommitted
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: Peter Shkenev <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
1 parent c90f2e1 commit b4a69f7

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)