Skip to content

Commit

Permalink
pata_at91: call clk_put() on ata_host_activate() failure
Browse files Browse the repository at this point in the history
pata_at91_probe() forgets to call clk_put() iff ata_host_activate() fails...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
  • Loading branch information
Sergei Shtylyov authored and Jeff Garzik committed Oct 14, 2011
1 parent c203603 commit 8e3bfdb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/ata/pata_at91.c
Original file line number Diff line number Diff line change
Expand Up @@ -414,10 +414,13 @@ static int __devinit pata_at91_probe(struct platform_device *pdev)

host->private_data = info;

return ata_host_activate(host, irq ? gpio_to_irq(irq) : 0,
ret = ata_host_activate(host, irq ? gpio_to_irq(irq) : 0,
irq ? ata_sff_interrupt : NULL,
irq_flags, &pata_at91_sht);

if (!ret)
return 0;

err_put:
clk_put(info->mck);
return ret;
Expand Down

0 comments on commit 8e3bfdb

Please sign in to comment.