* [PATCH] PCIE: cleanup on probe error
@ 2006-07-07 4:36 Randy.Dunlap
0 siblings, 0 replies; only message in thread
From: Randy.Dunlap @ 2006-07-07 4:36 UTC (permalink / raw)
To: lkml; +Cc: linux-pci, akpm, gregkh
From: Randy Dunlap <rdunlap@xenotime.net>
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>
---
drivers/pci/pcie/portdrv_pci.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletion(-)
--- linux-2618-rc1.orig/drivers/pci/pcie/portdrv_pci.c
+++ linux-2618-rc1/drivers/pci/pcie/portdrv_pci.c
@@ -73,8 +73,10 @@ static int __devinit pcie_portdrv_probe
"%s->Dev[%04x:%04x] has invalid IRQ. Check vendor BIOS\n",
__FUNCTION__, dev->device, dev->vendor);
}
- if (pcie_port_device_register(dev))
+ if (pcie_port_device_register(dev)) {
+ pci_disable_device(dev);
return -ENOMEM;
+ }
return 0;
}
---
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-07-07 4:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-07 4:36 [PATCH] PCIE: cleanup on probe error Randy.Dunlap
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®