Skip to contentSkip to conversation

ASoC: davinvi-mcasp: Balance pm_runtime_enable() on probe failure

PATCH Applied Anil Kumar 3 participants 3 messages Nov 9, 2014 – Nov 10, 2014

Subsystems (2)
lore
Share & tools
lore

Anil Kumar

author
#0 lore raw

PATCH 1/1 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.

---
:100644 100644 0eed9b1... 99c747d... M sound/soc/davinci/davinci-mcasp.c

 sound/soc/davinci/davinci-mcasp.c | 1 +
 1 file changed, 1 insertion(+)
sound/soc/davinci/davinci-mcasp.c +1 -0
index 0eed9b1..99c747d 100644
@@ -1235,6 +1235,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;
 	}
 
Signature · 1 line
1.9.2
Acked-by on v1 1/1
#1 lore raw
Quoted 2 lines · Anil Kumar

If probe fails then we need to call pm_runtime_disable() to balance out the previous pm_runtime_enable() call.

Quoted 20 lines

---
:100644 100644 0eed9b1... 99c747d... M sound/soc/davinci/davinci-mcasp.c

 sound/soc/davinci/davinci-mcasp.c | 1 +
 1 file changed, 1 insertion(+)
sound/soc/davinci/davinci-mcasp.c +1 -0
index 0eed9b1..99c747d 100644
@@ -1235,6 +1235,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;
 	}
 
Signature · 1 line
P?ter
maintainer Applied
#2 lore raw
In reply to Anil Kumar
Quoted 2 lines · Anil Kumar

If probe fails then we need to call pm_runtime_disable() to balance out the previous pm_runtime_enable() call.

applied, thanks.