Re: [PATCH v1] ARM: OMAP2+: Fix OF node reference leaks in omap_hwmod
Andreas Kemnade <[email protected]>
| Newsgroups | org.kernel.vger.linux-omap,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On Mon, 4 May 2026 12:47:11 -0400 Yuho Choi <[email protected]> wrote: > The OF helpers that return device nodes acquire references that must be > released by the caller. > > _init() leaks the "ocp" bus node returned by of_find_node_by_name() on > all paths after lookup, and also leaks the child returned by > of_get_next_child() when parsing module flags. Route the post-lookup > returns through a common cleanup path and release the child after use. > > omap_hwmod_setup_earlycon_flags() leaks the /chosen node and the UART > node resolved from stdout-path. Track them separately and drop both > references after use. > > Fixes: 1aa8f0cb19e5 ("ARM: OMAP2+: Remove unused legacy code for interconnects") > Fixes: 4f2122473363 ("ARM: OMAP2+: Check also the first dts child for hwmod flags") > Fixes: 8dd6666f4937 ("ARM: OMAP2+: omap_hwmod: Add support for earlycon") > Signed-off-by: Yuho Choi <[email protected]> Reviewed-by: Andreas Kemnade <[email protected]>