diff options
author | Randy Dunlap <rdunlap@xenotime.net> | 2006-07-07 00:36:01 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-08-03 16:20:06 -0400 |
commit | e4fd1f4a6e05335d464fe003c164fea850a3b3f3 (patch) | |
tree | fa1ed3dd97707d1a942f79ff8c8acfd32e2c2273 /drivers/pci/pcie | |
parent | 60854838596906ebae7f32e4de921e150e669b60 (diff) |
PCIE: cleanup on probe error
If pcie_portdrv_probe() fails but it had already called
pci_enable_device(), then call pci_disable_device() when
returning error.
Is there some reason that this isn't being done?
or was it just missed?
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/pcie')
-rw-r--r-- | drivers/pci/pcie/portdrv_pci.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c index d0a37976faa6..478d0d28f7ad 100644 --- a/drivers/pci/pcie/portdrv_pci.c +++ b/drivers/pci/pcie/portdrv_pci.c | |||
@@ -56,8 +56,10 @@ static int __devinit pcie_portdrv_probe (struct pci_dev *dev, | |||
56 | "%s->Dev[%04x:%04x] has invalid IRQ. Check vendor BIOS\n", | 56 | "%s->Dev[%04x:%04x] has invalid IRQ. Check vendor BIOS\n", |
57 | __FUNCTION__, dev->device, dev->vendor); | 57 | __FUNCTION__, dev->device, dev->vendor); |
58 | } | 58 | } |
59 | if (pcie_port_device_register(dev)) | 59 | if (pcie_port_device_register(dev)) { |
60 | pci_disable_device(dev); | ||
60 | return -ENOMEM; | 61 | return -ENOMEM; |
62 | } | ||
61 | 63 | ||
62 | return 0; | 64 | return 0; |
63 | } | 65 | } |