aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2014-05-23 02:24:59 -0400
committerMark Brown <broonie@linaro.org>2014-05-26 09:34:54 -0400
commitf451e48d8e1cae07d55b4a5b558c008cd4dc9a73 (patch)
treec566a30ae73588513e240700aa10cd3a4094b946 /sound
parente6b0d896ab0597d37422cae3cef3e789431549eb (diff)
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.c7
-rw-r--r--sound/soc/sh/rcar/ssi.c7
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,
598 598
599 nr = of_get_child_count(src_node); 599 nr = of_get_child_count(src_node);
600 if (!nr) 600 if (!nr)
601 return; 601 goto rsnd_of_parse_src_end;
602 602
603 src_info = devm_kzalloc(dev, 603 src_info = devm_kzalloc(dev,
604 sizeof(struct rsnd_src_platform_info) * nr, 604 sizeof(struct rsnd_src_platform_info) * nr,
605 GFP_KERNEL); 605 GFP_KERNEL);
606 if (!src_info) { 606 if (!src_info) {
607 dev_err(dev, "src info allocation error\n"); 607 dev_err(dev, "src info allocation error\n");
608 return; 608 goto rsnd_of_parse_src_end;
609 } 609 }
610 610
611 info->src_info = src_info; 611 info->src_info = src_info;
612 info->src_info_nr = nr; 612 info->src_info_nr = nr;
613
614rsnd_of_parse_src_end:
615 of_node_put(src_node);
613} 616}
614 617
615int rsnd_src_probe(struct platform_device *pdev, 618int 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,
554 554
555 nr = of_get_child_count(node); 555 nr = of_get_child_count(node);
556 if (!nr) 556 if (!nr)
557 return; 557 goto rsnd_of_parse_ssi_end;
558 558
559 ssi_info = devm_kzalloc(dev, 559 ssi_info = devm_kzalloc(dev,
560 sizeof(struct rsnd_ssi_platform_info) * nr, 560 sizeof(struct rsnd_ssi_platform_info) * nr,
561 GFP_KERNEL); 561 GFP_KERNEL);
562 if (!ssi_info) { 562 if (!ssi_info) {
563 dev_err(dev, "ssi info allocation error\n"); 563 dev_err(dev, "ssi info allocation error\n");
564 return; 564 goto rsnd_of_parse_ssi_end;
565 } 565 }
566 566
567 info->ssi_info = ssi_info; 567 info->ssi_info = ssi_info;
@@ -584,6 +584,9 @@ static void rsnd_of_parse_ssi(struct platform_device *pdev,
584 */ 584 */
585 ssi_info->pio_irq = irq_of_parse_and_map(np, 0); 585 ssi_info->pio_irq = irq_of_parse_and_map(np, 0);
586 } 586 }
587
588rsnd_of_parse_ssi_end:
589 of_node_put(node);
587} 590}
588 591
589int rsnd_ssi_probe(struct platform_device *pdev, 592int rsnd_ssi_probe(struct platform_device *pdev,