diff options
-rw-r--r-- | sound/soc/codecs/mc13783.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/sound/soc/codecs/mc13783.c b/sound/soc/codecs/mc13783.c index 388f90a597fa..71f775aad7c7 100644 --- a/sound/soc/codecs/mc13783.c +++ b/sound/soc/codecs/mc13783.c | |||
@@ -765,12 +765,18 @@ static int __init mc13783_codec_probe(struct platform_device *pdev) | |||
765 | return -ENOSYS; | 765 | return -ENOSYS; |
766 | 766 | ||
767 | ret = of_property_read_u32(np, "adc-port", &priv->adc_ssi_port); | 767 | ret = of_property_read_u32(np, "adc-port", &priv->adc_ssi_port); |
768 | if (ret) | 768 | if (ret) { |
769 | goto out; | 769 | of_node_put(np); |
770 | return ret; | ||
771 | } | ||
770 | 772 | ||
771 | ret = of_property_read_u32(np, "dac-port", &priv->dac_ssi_port); | 773 | ret = of_property_read_u32(np, "dac-port", &priv->dac_ssi_port); |
772 | if (ret) | 774 | if (ret) { |
773 | goto out; | 775 | of_node_put(np); |
776 | return ret; | ||
777 | } | ||
778 | |||
779 | of_node_put(np); | ||
774 | } | 780 | } |
775 | 781 | ||
776 | dev_set_drvdata(&pdev->dev, priv); | 782 | dev_set_drvdata(&pdev->dev, priv); |
@@ -783,8 +789,6 @@ static int __init mc13783_codec_probe(struct platform_device *pdev) | |||
783 | ret = snd_soc_register_codec(&pdev->dev, &soc_codec_dev_mc13783, | 789 | ret = snd_soc_register_codec(&pdev->dev, &soc_codec_dev_mc13783, |
784 | mc13783_dai_async, ARRAY_SIZE(mc13783_dai_async)); | 790 | mc13783_dai_async, ARRAY_SIZE(mc13783_dai_async)); |
785 | 791 | ||
786 | out: | ||
787 | of_node_put(np); | ||
788 | return ret; | 792 | return ret; |
789 | } | 793 | } |
790 | 794 | ||