summaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2014-04-14 18:01:47 +0200
committerTejun Heo <tj@kernel.org>2014-04-14 13:50:03 -0400
commit151eea367c720db8a0768caf47894c32991aa02a (patch)
treed1353a6c13c12d23685702667d2accd1686931c2 /drivers/ata
parentf5f85ee065f2e243f4165d7dd7d1a4a95daa1801 (diff)
downloadlinux-151eea367c720db8a0768caf47894c32991aa02a.tar.bz2
pata_arasan_cf: fix ata_host_activate() failure handling
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>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/pata_arasan_cf.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/ata/pata_arasan_cf.c b/drivers/ata/pata_arasan_cf.c
index 6fac524c2f50..4edb1a81f63f 100644
--- a/drivers/ata/pata_arasan_cf.c
+++ b/drivers/ata/pata_arasan_cf.c
@@ -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;