Re: [PATCH] ALSA: aoa: i2sbus: fix OF node lifetime handling

Takashi Iwai
2026-03-30T07:36:22Z

On Mon, 30 Mar 2026 06:00:34 +0200,
Cássio Gabriel wrote:
>
> i2sbus_add_dev() keeps the matched "sound" child pointer after
> for_each_child_of_node() has dropped the iterator reference. Take an
> extra reference before saving that node and drop it after the
> layout-id/device-id lookup is complete.
>
> The function also stores np in dev->sound.ofdev.dev.of_node without
> taking a reference for the embedded soundbus device. Since i2sbus
> overrides the embedded platform device release callback, balance that
> reference explicitly in the local error path and in i2sbus_release_dev().
>
> Fixes: f3d9478b2ce4 ("[ALSA] snd-aoa: add snd-aoa")
> Cc: stable@vger.kernel.org
> Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>

Applied to for-next branch now. Thanks.

Takashi