]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ASoC: davinvi-mcasp: Balance pm_runtime_enable() on probe failure
authorAnil Kumar <anilk4.v@gmail.com>
Sun, 9 Nov 2014 12:45:14 +0000 (18:15 +0530)
committerMark Brown <broonie@kernel.org>
Mon, 10 Nov 2014 13:45:38 +0000 (13:45 +0000)
If probe fails then we need to call pm_runtime_disable() to balance
out the previous pm_runtime_enable() call.

Signed-off-by: Anil Kumar <anilk4.v@gmail.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/davinci/davinci-mcasp.c

index 002351f9fc40ed24f175efda785016ca0cd33a51..57f606e4cf02a28b28956e0a5d35591fc870afd6 100644 (file)
@@ -1225,6 +1225,7 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
        ret = pm_runtime_get_sync(&pdev->dev);
        if (IS_ERR_VALUE(ret)) {
                dev_err(&pdev->dev, "pm_runtime_get_sync() failed\n");
+               pm_runtime_disable(&pdev->dev);
                return ret;
        }