Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Bartlomiej Zolnierkiewicz and committed by
Tejun Heo
151eea36 f5f85ee0

+5 -2
+5 -2
drivers/ata/pata_arasan_cf.c
··· 898 898 899 899 cf_card_detect(acdev, 0); 900 900 901 - return ata_host_activate(host, acdev->irq, irq_handler, 0, 902 - &arasan_cf_sht); 901 + ret = ata_host_activate(host, acdev->irq, irq_handler, 0, 902 + &arasan_cf_sht); 903 + if (!ret) 904 + return 0; 903 905 906 + cf_exit(acdev); 904 907 free_clk: 905 908 clk_put(acdev->clk); 906 909 return ret;