diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2014-05-22 23:24:59 -0700 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-05-26 14:34:54 +0100 |
commit | f451e48d8e1cae07d55b4a5b558c008cd4dc9a73 (patch) | |
tree | c566a30ae73588513e240700aa10cd3a4094b946 /sound | |
parent | e6b0d896ab0597d37422cae3cef3e789431549eb (diff) | |
download | linux-stable-f451e48d8e1cae07d55b4a5b558c008cd4dc9a73.tar.gz linux-stable-f451e48d8e1cae07d55b4a5b558c008cd4dc9a73.tar.bz2 linux-stable-f451e48d8e1cae07d55b4a5b558c008cd4dc9a73.zip |
ASoC: rsnd: DT node clean up by using the of_node_put()
Driver needs to call of_node_put() after of_get_chile_by_name()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/sh/rcar/src.c | 7 | ||||
-rw-r--r-- | sound/soc/sh/rcar/ssi.c | 7 |
2 files changed, 10 insertions, 4 deletions
diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c index 7da87cde0bc3..61009c44ed90 100644 --- a/sound/soc/sh/rcar/src.c +++ b/sound/soc/sh/rcar/src.c @@ -598,18 +598,21 @@ static void rsnd_of_parse_src(struct platform_device *pdev, nr = of_get_child_count(src_node); if (!nr) - return; + goto rsnd_of_parse_src_end; src_info = devm_kzalloc(dev, sizeof(struct rsnd_src_platform_info) * nr, GFP_KERNEL); if (!src_info) { dev_err(dev, "src info allocation error\n"); - return; + goto rsnd_of_parse_src_end; } info->src_info = src_info; info->src_info_nr = nr; + +rsnd_of_parse_src_end: + of_node_put(src_node); } int rsnd_src_probe(struct platform_device *pdev, diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c index 4b13edb26c4a..ea8d4e7a7986 100644 --- a/sound/soc/sh/rcar/ssi.c +++ b/sound/soc/sh/rcar/ssi.c @@ -554,14 +554,14 @@ static void rsnd_of_parse_ssi(struct platform_device *pdev, nr = of_get_child_count(node); if (!nr) - return; + goto rsnd_of_parse_ssi_end; ssi_info = devm_kzalloc(dev, sizeof(struct rsnd_ssi_platform_info) * nr, GFP_KERNEL); if (!ssi_info) { dev_err(dev, "ssi info allocation error\n"); - return; + goto rsnd_of_parse_ssi_end; } info->ssi_info = ssi_info; @@ -584,6 +584,9 @@ static void rsnd_of_parse_ssi(struct platform_device *pdev, */ ssi_info->pio_irq = irq_of_parse_and_map(np, 0); } + +rsnd_of_parse_ssi_end: + of_node_put(node); } int rsnd_ssi_probe(struct platform_device *pdev, |