Skip to contentSkip to conversation

pata_arasan_cf: fix ata_host_activate() failure handling

PATCH Applied Bartlomiej Zolnierkiewicz 3 participants 3 messages Apr 14, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 pata_arasan_cf: fix ata_host_activate() failure handling

Add missing cf_exit() and clk_put() calls to ata_host_activate() failure path.

---
v2:
- re-order code and then drop redundant goto statement

 drivers/ata/pata_arasan_cf.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/ata/pata_arasan_cf.c +5 -2
Index: b/drivers/ata/pata_arasan_cf.c
===================================================================
@@ -898,9 +898,12 @@ static int arasan_cf_probe(struct platfo
 
 	cf_card_detect(acdev, 0);
 
-	return ata_host_activate(host, acdev->irq, irq_handler, 0,
-			&arasan_cf_sht);
+	ret = ata_host_activate(host, acdev->irq, irq_handler, 0,
+				&arasan_cf_sht);
+	if (!ret)
+		return 0;
 
+	cf_exit(acdev);
 free_clk:
 	clk_put(acdev->clk);
 	return ret;
Acked-by on v2 1/1
#1 lore raw
Quoted 6 lines · Bartlomiej Zolnierkiewicz

Add missing cf_exit() and clk_put() calls to ata_host_activate() failure path.

Quoted 6 lines

---
v2:
- re-order code and then drop redundant goto statement

 drivers/ata/pata_arasan_cf.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)