summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc
diff options
context:
space:
mode:
authorHenry Zhang <henryzhang62@gmail.com>2026-11-17 15:41:07 -0800
committerMaíra Canal <mcanal@igalia.com>2026-11-18 10:37:34 -0300
commitdb9a489077cbe9217b7bc2b47ebf0fabc5f1a56f (patch)
treedc03ebf67640285fc515f92c470bca289e4e3880 /rust/kernel/alloc
parenta23e1f240f4309013e8e7d877944748f24a64a73 (diff)
drm/vc4: dsi: Register the PHY clock provider with devm
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. Use devm_of_clk_add_hw_provider(), so that the provider is removed with the same devres group, before the clocks and their data. Fixes: 4078f5757144 ("drm/vc4: Add DSI driver") Signed-off-by: Henry Zhang <henryzhang62@gmail.com> Reviewed-by: Maíra Canal <mcanal@igalia.com> Link: https://patch.msgid.link/20261117234107.1298575-1-henryzhang62@gmail.com Signed-off-by: Maíra Canal <mcanal@igalia.com>
Diffstat (limited to 'rust/kernel/alloc')
0 files changed, 0 insertions, 0 deletions