Don't enable the pci device twice (already done in the probe
routine). Propogate the error codes from pci_request_region
back to initial probing.
Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]>
--- sk98lin.orig/drivers/net/sk98lin/skge.c
+++ sk98lin/drivers/net/sk98lin/skge.c
@@ -292,17 +292,12 @@ static __devinit int SkGeInitPCI(SK_AC *
struct pci_dev *pdev = pAC->PciDev;
int retval;
- if (pci_enable_device(pdev) != 0) {
- return 1;
- }
-
dev->mem_start = pci_resource_start (pdev, 0);
pci_set_master(pdev);
- if (pci_request_regions(pdev, "sk98lin") != 0) {
- retval = 2;
- goto out_disable;
- }
+ retval = pci_request_regions(pdev, "sk98lin");
+ if (retval)
+ goto out;
#ifdef SK_BIG_ENDIAN
/*
@@ -321,9 +316,8 @@ static __devinit int SkGeInitPCI(SK_AC *
* Remap the regs into kernel space.
*/
pAC->IoBase = ioremap_nocache(dev->mem_start, 0x4000);
-
- if (!pAC->IoBase){
- retval = 3;
+ if (!pAC->IoBase) {
+ retval = -EIO;
goto out_release;
}
@@ -331,8 +325,7 @@ static __devinit int SkGeInitPCI(SK_AC *
out_release:
pci_release_regions(pdev);
- out_disable:
- pci_disable_device(pdev);
+ out:
return retval;
}
--
Stephen Hemminger <[EMAIL PROTECTED]>
OSDL http://developer.osdl.org/~shemminger
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html