Linux ATA/IDE development
 help / color / mirror / Atom feed
* [PATCH] ata: sata_gemini: unwind clocks on IDE pinctrl errors
@ 2026-06-26  8:58 Myeonghun Pak
  2026-06-26  9:10 ` sashiko-bot
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Myeonghun Pak @ 2026-06-26  8:58 UTC (permalink / raw)
  To: Linus Walleij, Damien Le Moal, Niklas Cassel
  Cc: linux-ide, linux-kernel, Myeonghun Pak, Ijae Kim

gemini_sata_bridge_init() prepares and enables both SATA PCLKs, then
disables them again while keeping the clocks prepared for later bridge
start and stop operations. If gemini_setup_ide_pins() fails after that,
gemini_sata_probe() returns directly and skips the existing
out_unprep_clk unwind path.

Route the IDE pinctrl failure through out_unprep_clk so the clocks
prepared by gemini_sata_bridge_init() are unprepared before probe
fails.

Fixes: d872ced29d5f ("ata: sata_gemini: Introduce explicit IDE pin control")
Co-developed-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
---
 drivers/ata/sata_gemini.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ata/sata_gemini.c b/drivers/ata/sata_gemini.c
index 582c9708275c..92984b34fd3b 100644
--- a/drivers/ata/sata_gemini.c
+++ b/drivers/ata/sata_gemini.c
@@ -355,7 +355,7 @@ static int gemini_sata_probe(struct platform_device *pdev)
 	if (sg->ide_pins) {
 		ret = gemini_setup_ide_pins(dev);
 		if (ret)
-			return ret;
+			goto out_unprep_clk;
 	}
 
 	dev_info(dev, "set up the Gemini IDE/SATA nexus\n");
-- 
2.47.1


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

end of thread, other threads:[~2026-06-26 21:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-26  8:58 [PATCH] ata: sata_gemini: unwind clocks on IDE pinctrl errors Myeonghun Pak
2026-06-26  9:10 ` sashiko-bot
2026-06-26 11:15 ` Niklas Cassel
2026-06-26 11:32 ` Damien Le Moal
2026-06-26 11:35   ` Niklas Cassel
2026-06-26 11:38     ` Damien Le Moal
2026-06-26 12:55 ` Linus Walleij
2026-06-26 21:43 ` Damien Le Moal

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