mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-02 16:44:10 +08:00
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>
This commit is contained in:
parent
a41619455c
commit
81a081fff7
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user