* [PATCH] soundwire: slave: fix an OF node reference leak in soundwire slave device
@ 2024-12-05 3:48 Joe Hattori
2024-12-17 11:28 ` Krzysztof Kozlowski
2025-02-13 16:30 ` Vinod Koul
0 siblings, 2 replies; 3+ messages in thread
From: Joe Hattori @ 2024-12-05 3:48 UTC (permalink / raw)
To: vkoul, yung-chuan.liao, pierre-louis.bossart, sanyog.r.kale
Cc: linux-sound, Joe Hattori
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>
---
drivers/soundwire/slave.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/soundwire/slave.c b/drivers/soundwire/slave.c
index 4869b073b11c..d2d99555ec5a 100644
--- a/drivers/soundwire/slave.c
+++ b/drivers/soundwire/slave.c
@@ -13,6 +13,7 @@ static void sdw_slave_release(struct device *dev)
{
struct sdw_slave *slave = dev_to_sdw_dev(dev);
+ of_node_put(slave->dev.of_node);
mutex_destroy(&slave->sdw_dev_lock);
kfree(slave);
}
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] soundwire: slave: fix an OF node reference leak in soundwire slave device
2024-12-05 3:48 [PATCH] soundwire: slave: fix an OF node reference leak in soundwire slave device Joe Hattori
@ 2024-12-17 11:28 ` Krzysztof Kozlowski
2025-02-13 16:30 ` Vinod Koul
1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2024-12-17 11:28 UTC (permalink / raw)
To: Joe Hattori, vkoul, yung-chuan.liao, pierre-louis.bossart,
sanyog.r.kale
Cc: linux-sound
On 05/12/2024 04:48, Joe Hattori wrote:
> 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>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] soundwire: slave: fix an OF node reference leak in soundwire slave device
2024-12-05 3:48 [PATCH] soundwire: slave: fix an OF node reference leak in soundwire slave device Joe Hattori
2024-12-17 11:28 ` Krzysztof Kozlowski
@ 2025-02-13 16:30 ` Vinod Koul
1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2025-02-13 16:30 UTC (permalink / raw)
To: yung-chuan.liao, pierre-louis.bossart, sanyog.r.kale, Joe Hattori
Cc: linux-sound
On Thu, 05 Dec 2024 12:48:44 +0900, Joe Hattori wrote:
> 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().
>
>
Applied, thanks!
[1/1] soundwire: slave: fix an OF node reference leak in soundwire slave device
commit: aac2f8363f773ae1f65aab140e06e2084ac6b787
Best regards,
--
~Vinod
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-02-13 16:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-05 3:48 [PATCH] soundwire: slave: fix an OF node reference leak in soundwire slave device Joe Hattori
2024-12-17 11:28 ` Krzysztof Kozlowski
2025-02-13 16:30 ` Vinod Koul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox