Re: [PATCH v1] bus: ti-sysc: Fix /chosen node reference leak
From: Andreas Kemnade
Date: Tue Jun 16 2026 - 13:57:56 EST
On Mon, 15 Jun 2026 16:05:40 -0400
Yuho Choi <dbgh9129@xxxxxxxxx> 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 <dbgh9129@xxxxxxxxx>
Reviewed-by: Andreas Kemnade <andreas@xxxxxxxxxxxx>