From: Timur Tabi Date: Mon, 22 Aug 2011 14:22:41 +0000 (-0500) Subject: sound/soc/fsl/fsl_dma.c: add missing of_node_put X-Git-Tag: v3.1~40^2~26 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=81a081fff7f3c144a0da9ee726906e533f66dd89;p=platform%2Fkernel%2Flinux-amlogic.git sound/soc/fsl/fsl_dma.c: add missing of_node_put 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 Acked-by: Liam Girdwood Signed-off-by: Mark Brown --- diff --git a/sound/soc/fsl/fsl_dma.c b/sound/soc/fsl/fsl_dma.c index 732208c..cb50598 100644 --- a/sound/soc/fsl/fsl_dma.c +++ b/sound/soc/fsl/fsl_dma.c @@ -879,10 +879,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; }