Skip to content

Commit c0ace41

Browse files
testacegidamien-lemoal
authored andcommitted
ata: sata_gemini: unwind clocks on IDE pinctrl errors
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: d872ced ("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> Reviewed-by: Niklas Cassel <cassel@kernel.org> Reviewed-by: Linus Walleij <linusw@kernel.org> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
1 parent 533a0b9 commit c0ace41

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/ata/sata_gemini.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ static int gemini_sata_probe(struct platform_device *pdev)
353353
if (sg->ide_pins) {
354354
ret = gemini_setup_ide_pins(dev);
355355
if (ret)
356-
return ret;
356+
goto out_unprep_clk;
357357
}
358358

359359
dev_info(dev, "set up the Gemini IDE/SATA nexus\n");

0 commit comments

Comments
 (0)