lkml.org 
[lkml]   [2022]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] ALSA: pxa2xx: Add missing of_node_put() in pxa_ssp_probe
Date
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
\
 
 \ /
  Last update: 2022-04-04 11:20    [W:0.045 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site