[PATCH v2] phy: ti: Add missing pm_runtime_disable() in serdes_am654_probe

Miaoqian Lin posted 1 patch 4 years, 3 months ago
drivers/phy/ti/phy-am654-serdes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH v2] phy: ti: Add missing pm_runtime_disable() in serdes_am654_probe
Posted by Miaoqian Lin 4 years, 3 months ago
The pm_runtime_enable() will increase power disable depth.
If the probe fails, we should use pm_runtime_disable() to balance
pm_runtime_enable().
Add missing pm_runtime_disable() for serdes_am654_probe().

Fixes: 71e2f5c ("phy: ti: Add a new SERDES driver for TI's AM654x SoC")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
---
changes in v2:
- remove unused label
---
 drivers/phy/ti/phy-am654-serdes.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/phy/ti/phy-am654-serdes.c b/drivers/phy/ti/phy-am654-serdes.c
index c1211c4f863c..0be727bb9f79 100644
--- a/drivers/phy/ti/phy-am654-serdes.c
+++ b/drivers/phy/ti/phy-am654-serdes.c
@@ -838,7 +838,7 @@ static int serdes_am654_probe(struct platform_device *pdev)
 
 clk_err:
 	of_clk_del_provider(node);
-
+	pm_runtime_disable(dev);
 	return ret;
 }
 
-- 
2.17.1
Re: [PATCH v2] phy: ti: Add missing pm_runtime_disable() in serdes_am654_probe
Posted by Vinod Koul 4 years, 2 months ago
On 01-03-22, 02:58, Miaoqian Lin wrote:
> The pm_runtime_enable() will increase power disable depth.
> If the probe fails, we should use pm_runtime_disable() to balance
> pm_runtime_enable().
> Add missing pm_runtime_disable() for serdes_am654_probe().

Applied, thanks

-- 
~Vinod