ASoC: mc13783: Add missing of_node_put
authorSachin Kamat <sachin.kamat@samsung.com>
Fri, 13 Jun 2014 04:27:45 +0000 (09:57 +0530)
committerMark Brown <broonie@linaro.org>
Sat, 21 Jun 2014 09:52:31 +0000 (10:52 +0100)
of_get_child_by_name expects of_node_put be called when done.

Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/codecs/mc13783.c

index 9965277b595a33b552a65f3188e00a17b1077e1a..388f90a597fa0ea31a608351ee99233bc2d3fc68 100644 (file)
@@ -766,11 +766,11 @@ static int __init mc13783_codec_probe(struct platform_device *pdev)
 
                ret = of_property_read_u32(np, "adc-port", &priv->adc_ssi_port);
                if (ret)
-                       return ret;
+                       goto out;
 
                ret = of_property_read_u32(np, "dac-port", &priv->dac_ssi_port);
                if (ret)
-                       return ret;
+                       goto out;
        }
 
        dev_set_drvdata(&pdev->dev, priv);
@@ -783,6 +783,8 @@ static int __init mc13783_codec_probe(struct platform_device *pdev)
                ret = snd_soc_register_codec(&pdev->dev, &soc_codec_dev_mc13783,
                        mc13783_dai_async, ARRAY_SIZE(mc13783_dai_async));
 
+out:
+       of_node_put(np);
        return ret;
 }