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

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>

authored by

Sergei Shtylyov and committed by
Jeff Garzik
c00a4c9d 3ee72ca9

+5 -2
+5 -2
drivers/ata/sata_mv.c
··· 4087 4087 dev_info(&pdev->dev, "slots %u ports %d\n", 4088 4088 (unsigned)MV_MAX_Q_DEPTH, host->n_ports); 4089 4089 4090 - return ata_host_activate(host, platform_get_irq(pdev, 0), mv_interrupt, 4091 - IRQF_SHARED, &mv6_sht); 4090 + rc = ata_host_activate(host, platform_get_irq(pdev, 0), mv_interrupt, 4091 + IRQF_SHARED, &mv6_sht); 4092 + if (!rc) 4093 + return 0; 4094 + 4092 4095 err: 4093 4096 #if defined(CONFIG_HAVE_CLK) 4094 4097 if (!IS_ERR(hpriv->clk)) {