[PATCH] drm/mediatek: mtk_hdmi_common: Fix clock reference leaks

CK Hu (胡俊光) ck.hu at mediatek.com
Tue Nov 24 19:02:46 PST 2026


On Thu, 2026-11-19 at 11:17 +0800, Haoxiang Li wrote:
> External email : Please do not click links or open attachments until you have verified the sender or the content.
> 
> 
> mtk_hdmi_get_all_clk() acquires clock references using
> of_clk_get_by_name(), but these references are never released.
> They leak when a later clock lookup or subsequent probe step
> fails, as well as on driver unbind.
> 
> Use devm_clk_get() to automatically release each successfully acquired
> clock reference on probe failure or driver unbind. Remove the now
> unused device-node parameter from mtk_hdmi_get_all_clk() and update
> its caller.

Reviewed-by: CK Hu <ck.hu at mediatek.com>

> 
> Fixes: 8f83f26891e1 ("drm/mediatek: Add HDMI support")
> Signed-off-by: Haoxiang Li <haoxiang_li2024 at 163.com>
> ---


More information about the linux-arm-kernel mailing list