Commit 110d4202 authored by Toby Chen's avatar Toby Chen Committed by Greg Kroah-Hartman
Browse files

drm/rockchip: dw_hdmi: cleanup drm encoder during unbind



[ Upstream commit b5af48ee ]

This fixes a use-after-free crash during rmmod.

The DRM encoder is embedded inside the larger rockchip_hdmi,
which is allocated with the component. The component memory
gets freed before the main drm device is destroyed. Fix it
by running encoder cleanup before tearing down its container.

Signed-off-by: default avatarToby Chen <tobyc@nvidia.com>
[moved encoder cleanup above clk_disable, similar to bind-error-path]
Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230317005126.496-1-tobyc@nvidia.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 79ca94bc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment