drm/amdgpu: check if hubbub is NULL in debugfs/amdgpu_dm_capabilities
Subsystems (3)
PATCH 1/1 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]>
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c +1 -1
@@ -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)
Signature · 1 line
2.50.1