]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amd/display: Check null pointers before using dc->clk_mgr
authorAlex Hung <alex.hung@amd.com>
Mon, 29 Jul 2024 21:29:09 +0000 (15:29 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Oct 2024 13:11:29 +0000 (15:11 +0200)
commita545a9403e04c6e17fdc04a26a61d9feebbba106
tree49f6fae596860f97be374a96bf6e3afa039a0f4a
parent6a6045adeb59feebca853ffd60e706b705c0695f
drm/amd/display: Check null pointers before using dc->clk_mgr

[ Upstream commit 95d9e0803e51d5a24276b7643b244c7477daf463 ]

[WHY & HOW]
dc->clk_mgr is null checked previously in the same function, indicating
it might be null.

Passing "dc" to "dc->hwss.apply_idle_power_optimizations", which
dereferences null "dc->clk_mgr". (The function pointer resolves to
"dcn35_apply_idle_power_optimizations".)

This fixes 1 FORWARD_NULL issue reported by Coverity.

Reviewed-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Tom Chung <chiahsuan.chung@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/display/dc/core/dc.c