Re: [PATCH v1] bus: ti-sysc: Fix /chosen node reference leak
Andreas Kemnade <[email protected]>
| Newsgroups | org.kernel.vger.linux-omap,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On Mon, 15 Jun 2026 16:05:40 -0400 Yuho Choi <[email protected]> wrote: > sysc_init_stdout_path() gets the /chosen node with > of_find_node_by_path() to read stdout-path. The function then overwrites > the local node pointer with the stdout-path lookup result, or exits on > error, without dropping the /chosen reference. > > Keep the /chosen node in a separate variable and put it after the > stdout-path value has been used for the lookup. The successful stdout > node lookup remains referenced by the cached stdout_path pointer. > > Fixes: 3bb37c8e6e6a ("bus: ti-sysc: Handle stdout-path for debug console") > Signed-off-by: Yuho Choi <[email protected]> Reviewed-by: Andreas Kemnade <[email protected]>