aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu.h
diff options
context:
space:
mode:
authorNikita Zhandarovich <[email protected]>2024-02-06 16:50:56 +0000
committerAlex Deucher <[email protected]>2024-02-12 21:13:53 +0000
commit2a3cfb9a24a28da9cc13d2c525a76548865e182c (patch)
tree48bab27ab869c49ce88fa7d9cc3a8d9707e97f5a /drivers/gpu/drm/amd/amdgpu/amdgpu.h
parentdrm/radeon/ni: Fix wrong firmware size logging in ni_init_microcode() (diff)
downloadkernel-2a3cfb9a24a28da9cc13d2c525a76548865e182c.tar.gz
kernel-2a3cfb9a24a28da9cc13d2c525a76548865e182c.zip
drm/amd/display: fix NULL checks for adev->dm.dc in amdgpu_dm_fini()
Since 'adev->dm.dc' in amdgpu_dm_fini() might turn out to be NULL before the call to dc_enable_dmub_notifications(), check beforehand to ensure there will not be a possible NULL-ptr-deref there. Also, since commit 1e88eb1b2c25 ("drm/amd/display: Drop CONFIG_DRM_AMD_DC_HDCP") there are two separate checks for NULL in 'adev->dm.dc' before dc_deinit_callbacks() and dc_dmub_srv_destroy(). Clean up by combining them all under one 'if'. Found by Linux Verification Center (linuxtesting.org) with static analysis tool SVACE. Fixes: 81927e2808be ("drm/amd/display: Support for DMUB AUX") Signed-off-by: Nikita Zhandarovich <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu.h')
0 files changed, 0 insertions, 0 deletions