Skip to contentSkip to conversation

pata_samsung_cf: fix ata_host_activate() failure handling

PATCH Applied Bartlomiej Zolnierkiewicz 3 participants 4 messages Mar 31, 2014 – Apr 15, 2014

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

PATCH 1/1 pata_samsung_cf: fix ata_host_activate() failure handling

Add missing clk_disable() call to ata_host_activate() failure path.

---
 drivers/ata/pata_samsung_cf.c |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
drivers/ata/pata_samsung_cf.c +7 -3
Index: b/drivers/ata/pata_samsung_cf.c
===================================================================
@@ -594,9 +594,13 @@ static int __init pata_s3c_probe(struct
 
 	platform_set_drvdata(pdev, host);
 
-	return ata_host_activate(host, info->irq,
-			info->irq ? pata_s3c_irq : NULL,
-			0, &pata_s3c_sht);
+	ret = ata_host_activate(host, info->irq,
+				info->irq ? pata_s3c_irq : NULL,
+				0, &pata_s3c_sht);
+	if (ret)
+		goto stop_clk;
+
+	return 0;
 
 stop_clk:
 	clk_disable(info->clk);
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Tejun Heo

Add missing clk_disable() call to ata_host_activate() failure path.

Best regards,
Jingoo Han

Quoted 27 lines
---
 drivers/ata/pata_samsung_cf.c |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

Index: b/drivers/ata/pata_samsung_cf.c
===================================================================

drivers/ata/pata_samsung_cf.c +7 -4
@@ -594,9 +594,13 @@ static int __init pata_s3c_probe(struct
 
 	platform_set_drvdata(pdev, host);
 
-	return ata_host_activate(host, info->irq,
-			info->irq ? pata_s3c_irq : NULL,
-			0, &pata_s3c_sht);
+	ret = ata_host_activate(host, info->irq,
+				info->irq ? pata_s3c_irq : NULL,
+				0, &pata_s3c_sht);
+	if (ret)
+		goto stop_clk;
+
+	return 0;
 
 stop_clk:
 	clk_disable(info->clk);
 
--
#2 lore raw

Hi,

Tejun, could you please also pick this one?

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

Quoted 40 lines · Jingoo Han
Quoted 6 lines · Tejun Heo

Add missing clk_disable() call to ata_host_activate() failure path.

Best regards,
Jingoo Han

Quoted 27 lines
---
 drivers/ata/pata_samsung_cf.c |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

Index: b/drivers/ata/pata_samsung_cf.c
===================================================================

drivers/ata/pata_samsung_cf.c +7 -4
@@ -594,9 +594,13 @@ static int __init pata_s3c_probe(struct
 
 	platform_set_drvdata(pdev, host);
 
-	return ata_host_activate(host, info->irq,
-			info->irq ? pata_s3c_irq : NULL,
-			0, &pata_s3c_sht);
+	ret = ata_host_activate(host, info->irq,
+				info->irq ? pata_s3c_irq : NULL,
+				0, &pata_s3c_sht);
+	if (ret)
+		goto stop_clk;
+
+	return 0;
 
 stop_clk:
 	clk_disable(info->clk);
 
--