From: Sergei Shtylyov Date: Fri, 7 Oct 2011 15:22:33 +0000 (+0400) Subject: sata_mv: release clock on ata_host_activate() failure X-Git-Tag: v3.2-rc1~151^2~49 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c00a4c9d247a3a24190d2f27ab9b23424d8b082c;p=profile%2Fivi%2Fkernel-x86-ivi.git 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 Signed-off-by: Jeff Garzik --- diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 4b6b209..647cb3a 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)) {