pata_arasan_cf: fix ata_host_activate() failure handling
authorBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Mon, 14 Apr 2014 16:01:47 +0000 (18:01 +0200)
committerTejun Heo <tj@kernel.org>
Mon, 14 Apr 2014 17:50:03 +0000 (13:50 -0400)
Add missing cf_exit() and clk_put() calls to ata_host_activate()
failure path.

Cc: Viresh Kumar <viresh.linux@gmail.com>
Cc: Shiraz Hashim <shiraz.hashim@st.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
drivers/ata/pata_arasan_cf.c

index 6fac524..4edb1a8 100644 (file)
@@ -898,9 +898,12 @@ static int arasan_cf_probe(struct platform_device *pdev)
 
        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;