]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
soundwire: slave: fix an OF node reference leak in soundwire slave device
authorJoe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
Thu, 5 Dec 2024 03:48:44 +0000 (12:48 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Apr 2025 12:37:32 +0000 (14:37 +0200)
commitb302c4d3f42a761514217511dcac4ff9d20da5d1
tree54e54ab19eaa64e39b9ff8f3801f197adb3cc700
parent98fa452d0cf2364ecfa4fa7e740412d73cbb5a0d
soundwire: slave: fix an OF node reference leak in soundwire slave device

[ Upstream commit aac2f8363f773ae1f65aab140e06e2084ac6b787 ]

When initializing a soundwire slave device, an OF node is stored to the
device with refcount incremented. However, the refcount is not
decremented in .release(), thus call of_node_put() in
sdw_slave_release().

Fixes: a2e484585ad3 ("soundwire: core: add device tree support for slave devices")
Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20241205034844.2784964-1-joe@pf.is.s.u-tokyo.ac.jp
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/soundwire/slave.c