]> git.ipfire.org Git - thirdparty/linux.git/commit
ALSA: aoa: i2sbus: fix OF node lifetime handling
authorCássio Gabriel <cassiogabrielcontato@gmail.com>
Mon, 30 Mar 2026 04:00:34 +0000 (01:00 -0300)
committerTakashi Iwai <tiwai@suse.de>
Mon, 30 Mar 2026 07:35:56 +0000 (09:35 +0200)
commit4ec93f070eda6b765b62efcaed9241c3b3b0b6ad
treeb681af24a5764e5f53f5435d15e629b693261b07
parent472571498baaa67b6ea70d6c0154730be3da3c36
ALSA: aoa: i2sbus: fix OF node lifetime handling

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>
Link: https://patch.msgid.link/20260330-aoa-i2sbus-ofnode-lifetime-v1-1-51c309f4ff06@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/aoa/soundbus/i2sbus/core.c