Linux-PHY Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] phy: mapphone-mdm6600: cancel delayed work on probe error
@ 2026-11-30  5:08 Cong Nguyen
  2026-11-30  5:19 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Cong Nguyen @ 2026-11-30  5:08 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Neil Armstrong, Manivannan Sadhasivam, Tony Lindgren, linux-phy,
	linux-kernel

phy_mdm6600_probe() queues bootup_work before it can fail, and the
status IRQ and runtime resume queue status_work and modem_wake_work.
If a later step fails, the probe error path does not cancel them, and
they can run after the devres-managed ddata is freed.

Cancel the three works in the error path, as phy_mdm6600_remove() does.

Fixes: 2ad2af081622 ("phy: mapphone-mdm6600: Improve phy related runtime PM calls")
Signed-off-by: Cong Nguyen <congnt264@gmail.com>
---
 drivers/phy/motorola/phy-mapphone-mdm6600.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/phy/motorola/phy-mapphone-mdm6600.c b/drivers/phy/motorola/phy-mapphone-mdm6600.c
index ff364a990187..9f3a81992c0e 100644
--- a/drivers/phy/motorola/phy-mapphone-mdm6600.c
+++ b/drivers/phy/motorola/phy-mapphone-mdm6600.c
@@ -624,6 +624,9 @@ static int phy_mdm6600_probe(struct platform_device *pdev)
 		phy_mdm6600_device_power_off(ddata);
 		pm_runtime_disable(ddata->dev);
 		pm_runtime_dont_use_autosuspend(ddata->dev);
+		cancel_delayed_work_sync(&ddata->modem_wake_work);
+		cancel_delayed_work_sync(&ddata->bootup_work);
+		cancel_delayed_work_sync(&ddata->status_work);
 	}
 
 	return error;
-- 
2.25.1


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

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

end of thread, other threads:[~2026-11-30  5:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-30  5:08 [PATCH] phy: mapphone-mdm6600: cancel delayed work on probe error Cong Nguyen
2026-11-30  5:19 ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox