linux-phy.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] phy: mapphone-mdm6600: Fix runtime disable on probe
@ 2023-09-11  3:54 Tony Lindgren
  2023-09-11  3:54 ` [PATCH 2/3] phy: mapphone-mdm6600: Fix runtime PM for remove Tony Lindgren
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Tony Lindgren @ 2023-09-11  3:54 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I, Miaoqian Lin
  Cc: Ivaylo Dimitrov, Merlijn Wajer, Pavel Machek, Sebastian Reichel,
	linux-phy

Commit d644e0d79829 ("phy: mapphone-mdm6600: Fix PM error handling in
phy_mdm6600_probe") caused a regression where we now unconditionally
disable runtime PM at the end of the probe while it is only needed on
errors.

Cc: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Cc: Merlijn Wajer <merlijn@wizzup.org>
Cc: Miaoqian Lin <linmq006@gmail.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Sebastian Reichel <sre@kernel.org>
Fixes: d644e0d79829 ("phy: mapphone-mdm6600: Fix PM error handling in phy_mdm6600_probe")
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 drivers/phy/motorola/phy-mapphone-mdm6600.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/phy/motorola/phy-mapphone-mdm6600.c b/drivers/phy/motorola/phy-mapphone-mdm6600.c
--- a/drivers/phy/motorola/phy-mapphone-mdm6600.c
+++ b/drivers/phy/motorola/phy-mapphone-mdm6600.c
@@ -627,10 +627,12 @@ static int phy_mdm6600_probe(struct platform_device *pdev)
 	pm_runtime_put_autosuspend(ddata->dev);
 
 cleanup:
-	if (error < 0)
+	if (error < 0) {
 		phy_mdm6600_device_power_off(ddata);
-	pm_runtime_disable(ddata->dev);
-	pm_runtime_dont_use_autosuspend(ddata->dev);
+		pm_runtime_disable(ddata->dev);
+		pm_runtime_dont_use_autosuspend(ddata->dev);
+	}
+
 	return error;
 }
 
-- 
2.42.0

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-09-13  4:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-11  3:54 [PATCH 1/3] phy: mapphone-mdm6600: Fix runtime disable on probe Tony Lindgren
2023-09-11  3:54 ` [PATCH 2/3] phy: mapphone-mdm6600: Fix runtime PM for remove Tony Lindgren
2023-09-12 15:00   ` Sebastian Reichel
2023-09-13  4:36     ` Tony Lindgren
2023-09-11  3:54 ` [PATCH 3/3] phy: mapphone-mdm6600: Fix pinctrl_pm handling for sleep pins Tony Lindgren
2023-09-12 15:14   ` Sebastian Reichel
2023-09-13  4:59     ` Tony Lindgren
2023-09-12 15:00 ` [PATCH 1/3] phy: mapphone-mdm6600: Fix runtime disable on probe Sebastian Reichel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).