Re: [PATCH] drm/vc4: dsi: Register the PHY clock provider with devm
From: Maíra Canal
Date: Wed Nov 18 2026 - 08:41:28 EST
On Tue, 17 Nov 2026 15:41:07 -0800, Henry Zhang wrote:
> vc4_dsi_init_phy_clocks() is called from the component bind. It
> allocates the clock data with devm_kzalloc() and registers the clocks
> with devm_clk_hw_register(), so both are released with the devres group
> that the component framework opens for the bind, when the bind fails
> later or the component is unbound. The OF clock provider that points at
> that data is added with of_clk_add_hw_provider() and never removed:
> after an unbind it stays registered with the freed data, and each new
> bind adds another provider for the same node. A later lookup of one of
> these clocks, such as <&dsi1 0>, would call of_clk_hw_onecell_get() on
> freed memory.
>
> [...]
Applied with the AI-assistance note in the commit message removed, thanks!
[1/1] drm/vc4: dsi: Register the PHY clock provider with devm
commit: db9a489077cbe9217b7bc2b47ebf0fabc5f1a56f
Best regards,
- Maíra