ASoC: fsl-asoc-card: put ASRC OF node in case of unknown device
authorMaciej S. Szmigiero <mail@maciej.szmigiero.name>
Mon, 31 Aug 2015 15:07:12 +0000 (17:07 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 31 Aug 2015 15:08:50 +0000 (16:08 +0100)
In case of unknown DT compatible device the ASRC OF node
possibly acquired earlier by of_parse_phandle() has
to be put before returning from probe method.

Signed-off-by: Maciej Szmigiero <mail@maciej.szmigiero.name>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/fsl-asoc-card.c

index 5aeb6ed4827e821f0f0ec2cbc866ed1a99a73cc4..96f55ae75c719c87d1dcf9084ccc4e6a679a187f 100644 (file)
@@ -488,7 +488,8 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
                priv->dai_fmt |= SND_SOC_DAIFMT_CBM_CFM;
        } else {
                dev_err(&pdev->dev, "unknown Device Tree compatible\n");
-               return -EINVAL;
+               ret = -EINVAL;
+               goto asrc_fail;
        }
 
        /* Common settings for corresponding Freescale CPU DAI driver */