Skip to contentSkip to conversation

isdn: avm: call disable_pci_device() if pci_probe() failed

PATCH Superseded Kulikov Vasiliy 1 participant 1 message Aug 6, 2010

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 6/18 isdn: avm: call disable_pci_device() if pci_probe() failed

Driver should call disable_pci_device() if it returns from pci_probe() with error. Also it must not be called if request_region() fails as it means that somebody uses device resources and rules the device.

---
 drivers/isdn/hardware/avm/c4.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/isdn/hardware/avm/c4.c +2 -0
index 7715d32..f255001 100644
@@ -1273,6 +1273,8 @@ static int __devinit c4_probe(struct pci_dev *dev,
 	if (retval != 0) {
 		printk(KERN_ERR "c4: no AVM-C%d at i/o %#x, irq %d detected, mem %#x\n",
 		       nr, param.port, param.irq, param.membase);
+		if (retval != -EBUSY)
+			pci_disable_device(dev);
 		return -ENODEV;
 	}
 	return 0;
Signature · 1 line
1.7.0.4