diff options
author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2011-10-10 17:09:17 +0200 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2011-10-14 19:01:39 +0200 |
commit | 8e3bfdb95ad7440fa2c7eca5551b9169a5cdcf58 (patch) | |
tree | fe8db4d9d2479564c341c3d564b634aa3485d097 /drivers/ata | |
parent | libata: reduce ata_pci_[sff,bmdma]_init_one() size (diff) | |
download | linux-8e3bfdb95ad7440fa2c7eca5551b9169a5cdcf58.tar.xz linux-8e3bfdb95ad7440fa2c7eca5551b9169a5cdcf58.zip |
pata_at91: call clk_put() on ata_host_activate() failure
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>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/pata_at91.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/ata/pata_at91.c b/drivers/ata/pata_at91.c index 960c72571395..c6d14090a42b 100644 --- a/drivers/ata/pata_at91.c +++ b/drivers/ata/pata_at91.c @@ -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; |