projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c5fae31
)
ASoC: codecs: wcd937x: fix OF node leaks on probe failure
author
Johan Hovold
<johan@kernel.org>
Mon, 1 Dec 2025 09:34:17 +0000
(10:34 +0100)
committer
Mark Brown
<broonie@kernel.org>
Tue, 2 Dec 2025 13:37:42 +0000
(13:37 +0000)
The component match entry release function will drop the references
taken while looking up the soundwire OF nodes when the platform device
is unbound.
Drop the additional references taken to avoid leaking them on probe
failure (e.g. probe deferral) and on driver unbind.
Fixes:
9be3ec196da4
("ASoC: codecs: wcd937x: add wcd937x codec driver")
Cc: Prasad Kumpatla <prasad.kumpatla@oss.qualcomm.com>
Cc: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link:
https://patch.msgid.link/20251201093419.24474-2-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/wcd937x.c
patch
|
blob
|
history
diff --git
a/sound/soc/codecs/wcd937x.c
b/sound/soc/codecs/wcd937x.c
index
f53cddf
..
f1ef673
100644
(file)
--- a/
sound/soc/codecs/wcd937x.c
+++ b/
sound/soc/codecs/wcd937x.c
@@
-2841,7
+2841,7
@@
static int wcd937x_add_slave_components(struct wcd937x_priv *wcd937x,
dev_err(dev, "Couldn't parse phandle to qcom,rx-device!\n");
return -ENODEV;
}
- of_node_get(wcd937x->rxnode);
+
component_match_add_release(dev, matchptr, component_release_of,
component_compare_of, wcd937x->rxnode);
@@
-2850,7
+2850,7
@@
static int wcd937x_add_slave_components(struct wcd937x_priv *wcd937x,
dev_err(dev, "Couldn't parse phandle to qcom,tx-device\n");
return -ENODEV;
}
- of_node_get(wcd937x->txnode);
+
component_match_add_release(dev, matchptr, component_release_of,
component_compare_of, wcd937x->txnode);