aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2008-07-24 11:38:06 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-07-31 01:38:19 -0400
commite8389f0c44652ee63d95bc0a7f8d565ac25dac77 (patch)
treec3fd2a632c1c3871024882cae43d8efda32aec9e /drivers/ata
parent660fc1f4d88b0f5e4bb936e4a5a9b95b70df9e58 (diff)
pata_ali: misplaced pci_dev_put()
The ali_init_one() function does a search for an isa_bridge, but then fails to release it if the revision information was not correctly found. the problem comes from: isa_bridge = pci_get_device(...); if (isa_bridge && ...) { pci_dev_put(isa_bridge); } where the pci_dev_put() is never called if isa_bridge was valid but the extra checks on the chip-revision fail to match. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/pata_ali.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/ata/pata_ali.c b/drivers/ata/pata_ali.c
index 0f3e659db99a..5ca70fa1f587 100644
--- a/drivers/ata/pata_ali.c
+++ b/drivers/ata/pata_ali.c
@@ -550,8 +550,9 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
550 pci_read_config_byte(isa_bridge, 0x5E, &tmp); 550 pci_read_config_byte(isa_bridge, 0x5E, &tmp);
551 if ((tmp & 0x1E) == 0x12) 551 if ((tmp & 0x1E) == 0x12)
552 ppi[0] = &info_20_udma; 552 ppi[0] = &info_20_udma;
553 pci_dev_put(isa_bridge);
554 } 553 }
554 pci_dev_put(isa_bridge);
555
555 return ata_pci_sff_init_one(pdev, ppi, &ali_sht, NULL); 556 return ata_pci_sff_init_one(pdev, ppi, &ali_sht, NULL);
556} 557}
557 558