]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amdgpu: check if hubbub is NULL in debugfs/amdgpu_dm_capabilities
authorPeter Shkenev <mustela@erminea.space>
Thu, 17 Jul 2025 20:48:17 +0000 (23:48 +0300)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 28 Jul 2025 20:24:48 +0000 (16:24 -0400)
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
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c

index c7d13e743e6c8ca9610f42c39e94ac4c2a62cbcd..b726bcd18e2982761746863ce877332b4d900dc5 100644 (file)
@@ -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)