Commit 81a081ff authored by Timur Tabi's avatar Timur Tabi Committed by Mark Brown

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: default avatarJulia Lawall <julia@diku.dk>
Signed-off-by: default avatarTimur Tabi <timur@freescale.com>
Acked-by: default avatarLiam Girdwood <lrg@ti.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent a4161945
...@@ -879,10 +879,12 @@ static struct device_node *find_ssi_node(struct device_node *dma_channel_np) ...@@ -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. * assume that device_node pointers are a valid comparison.
*/ */
np = of_parse_phandle(ssi_np, "fsl,playback-dma", 0); np = of_parse_phandle(ssi_np, "fsl,playback-dma", 0);
of_node_put(np);
if (np == dma_channel_np) if (np == dma_channel_np)
return ssi_np; return ssi_np;
np = of_parse_phandle(ssi_np, "fsl,capture-dma", 0); np = of_parse_phandle(ssi_np, "fsl,capture-dma", 0);
of_node_put(np);
if (np == dma_channel_np) if (np == dma_channel_np)
return ssi_np; return ssi_np;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment