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

pata_samsung_cf: fix ata_host_activate() failure handling

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

Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Reviewed-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Tejun Heo <tj@kernel.org>

authored by

Bartlomiej Zolnierkiewicz and committed by
Tejun Heo
3608aeff 151eea36

+7 -3
+7 -3
drivers/ata/pata_samsung_cf.c
··· 594 594 595 595 platform_set_drvdata(pdev, host); 596 596 597 - return ata_host_activate(host, info->irq, 598 - info->irq ? pata_s3c_irq : NULL, 599 - 0, &pata_s3c_sht); 597 + ret = ata_host_activate(host, info->irq, 598 + info->irq ? pata_s3c_irq : NULL, 599 + 0, &pata_s3c_sht); 600 + if (ret) 601 + goto stop_clk; 602 + 603 + return 0; 600 604 601 605 stop_clk: 602 606 clk_disable(info->clk);