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>
This commit is contained in:
Randy Dunlap 2006-07-06 21:36:01 -07:00 коммит произвёл Greg Kroah-Hartman
Родитель 6085483859
Коммит e4fd1f4a6e
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -56,8 +56,10 @@ static int __devinit pcie_portdrv_probe (struct pci_dev *dev,
"%s->Dev[%04x:%04x] has invalid IRQ. Check vendor BIOS\n", "%s->Dev[%04x:%04x] has invalid IRQ. Check vendor BIOS\n",
__FUNCTION__, dev->device, dev->vendor); __FUNCTION__, dev->device, dev->vendor);
} }
if (pcie_port_device_register(dev)) if (pcie_port_device_register(dev)) {
pci_disable_device(dev);
return -ENOMEM; return -ENOMEM;
}
return 0; return 0;
} }