Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c00a4c9d authored by Sergei Shtylyov's avatar Sergei Shtylyov Committed by Jeff Garzik
Browse files

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: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent 3ee72ca9
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -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,
	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)) {