From: Anil Kumar Date: Sun, 9 Nov 2014 12:45:14 +0000 (+0530) Subject: ASoC: davinvi-mcasp: Balance pm_runtime_enable() on probe failure X-Git-Tag: v3.19-rc1~119^2~20^2~28^3~2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7771ef3286711a121b763c3620c4619f51b2acfd;p=karo-tx-linux.git ASoC: davinvi-mcasp: Balance pm_runtime_enable() on probe failure 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 Acked-by: Peter Ujfalusi Signed-off-by: Mark Brown --- diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c index 002351f9fc40..57f606e4cf02 100644 --- a/sound/soc/davinci/davinci-mcasp.c +++ b/sound/soc/davinci/davinci-mcasp.c @@ -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; }