From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Timur Tabi To: , , , , , , , , , , Subject: [PATCH] [v2] sound/soc/fsl/fsl_dma.c: add missing of_node_put Date: Mon, 22 Aug 2011 09:22:41 -0500 Message-ID: <1314022961-27513-1-git-send-email-timur@freescale.com> MIME-Version: 1.0 Content-Type: text/plain List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , of_parse_phandle increments the reference count of np, so this should be decremented before trying the next possibility. Since we don't actually use np, we can decrement the reference count immediately. Reported-by: Julia Lawall Signed-off-by: Timur Tabi --- sound/soc/fsl/fsl_dma.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/sound/soc/fsl/fsl_dma.c b/sound/soc/fsl/fsl_dma.c index 6680c0b..b300f4b 100644 --- a/sound/soc/fsl/fsl_dma.c +++ b/sound/soc/fsl/fsl_dma.c @@ -877,10 +877,12 @@ static struct device_node *find_ssi_node(struct device_node *dma_channel_np) * assume that device_node pointers are a valid comparison. */ np = of_parse_phandle(ssi_np, "fsl,playback-dma", 0); + of_node_put(np); if (np == dma_channel_np) return ssi_np; np = of_parse_phandle(ssi_np, "fsl,capture-dma", 0); + of_node_put(np); if (np == dma_channel_np) return ssi_np; } -- 1.7.3.4