diff options
author | Timur Tabi <timur@freescale.com> | 2011-08-22 18:22:41 +0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-08-23 02:26:33 +0400 |
commit | 81a081fff7f3c144a0da9ee726906e533f66dd89 (patch) | |
tree | 1b17cb86b1b47f46a090eccde7a87280bde83717 /sound/soc/fsl/fsl_dma.c | |
parent | a41619455c0e28b6973471e87f1702c6129d3439 (diff) | |
download | linux-81a081fff7f3c144a0da9ee726906e533f66dd89.tar.xz |
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 <julia@diku.dk>
Signed-off-by: Timur Tabi <timur@freescale.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/fsl/fsl_dma.c')
-rw-r--r-- | 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 732208c8c0b4..cb50598338e9 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; } |