linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ALSA: pxa2xx: Add missing of_node_put() in pxa_ssp_probe
@ 2022-04-04  9:19 Miaoqian Lin
  0 siblings, 0 replies; only message in thread
From: Miaoqian Lin @ 2022-04-04  9:19 UTC (permalink / raw)
  To: Daniel Mack, Haojian Zhuang, Robert Jarzmik, Liam Girdwood,
	Mark Brown, Jaroslav Kysela, Takashi Iwai, linux-arm-kernel,
	alsa-devel, linux-kernel
  Cc: linmq006

This node pointer is returned by of_parse_phandle() with refcount
incremented in this function. Calling of_node_put() to avoid
the refcount leak.

Fixes: 2023c90c3a2c ("ASoC: pxa: pxa-ssp: add DT bindings")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
---
 sound/soc/pxa/pxa-ssp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c
index 7f13a35e9cc1..167b90b48d7f 100644
--- a/sound/soc/pxa/pxa-ssp.c
+++ b/sound/soc/pxa/pxa-ssp.c
@@ -770,6 +770,7 @@ static int pxa_ssp_probe(struct snd_soc_dai *dai)
 		}
 
 		priv->ssp = pxa_ssp_request_of(ssp_handle, "SoC audio");
+		of_node_put(ssp_handle);
 		if (priv->ssp == NULL) {
 			ret = -ENODEV;
 			goto err_priv;
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-04-04  9:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-04  9:19 [PATCH] ALSA: pxa2xx: Add missing of_node_put() in pxa_ssp_probe Miaoqian Lin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).