Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;
	}