summaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorSergei Shtylyov <sshtylyov@ru.mvista.com>2011-10-07 19:22:33 +0400
committerJeff Garzik <jgarzik@redhat.com>2011-10-07 23:46:12 -0400
commitc00a4c9d247a3a24190d2f27ab9b23424d8b082c (patch)
treeaa920ff8ddaad797152572eea4d11b4e24442373 /drivers/ata
parent3ee72ca99288f1de95ec9c570e43f531c8799f06 (diff)
downloadblackbird-obmc-linux-c00a4c9d247a3a24190d2f27ab9b23424d8b082c.tar.gz
blackbird-obmc-linux-c00a4c9d247a3a24190d2f27ab9b23424d8b082c.zip
sata_mv: release clock on ata_host_activate() failure
mv_platfrom_probe() forgets to call clk_disable() and clk_put() iff ata_host_activate() fails... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/sata_mv.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 4b6b2090784b..647cb3abf4d6 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -4087,8 +4087,11 @@ static int mv_platform_probe(struct platform_device *pdev)
dev_info(&pdev->dev, "slots %u ports %d\n",
(unsigned)MV_MAX_Q_DEPTH, host->n_ports);
- return ata_host_activate(host, platform_get_irq(pdev, 0), mv_interrupt,
- IRQF_SHARED, &mv6_sht);
+ rc = ata_host_activate(host, platform_get_irq(pdev, 0), mv_interrupt,
+ IRQF_SHARED, &mv6_sht);
+ if (!rc)
+ return 0;
+
err:
#if defined(CONFIG_HAVE_CLK)
if (!IS_ERR(hpriv->clk)) {
OpenPOWER on IntegriCloud