aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sk98lin/skge.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/sk98lin/skge.c')
-rw-r--r--drivers/net/sk98lin/skge.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/drivers/net/sk98lin/skge.c b/drivers/net/sk98lin/skge.c
index 455417d5fcfb..197edd74fbb5 100644
--- a/drivers/net/sk98lin/skge.c
+++ b/drivers/net/sk98lin/skge.c
@@ -292,17 +292,12 @@ static __devinit int SkGeInitPCI(SK_AC *pAC)
292 struct pci_dev *pdev = pAC->PciDev; 292 struct pci_dev *pdev = pAC->PciDev;
293 int retval; 293 int retval;
294 294
295 if (pci_enable_device(pdev) != 0) {
296 return 1;
297 }
298
299 dev->mem_start = pci_resource_start (pdev, 0); 295 dev->mem_start = pci_resource_start (pdev, 0);
300 pci_set_master(pdev); 296 pci_set_master(pdev);
301 297
302 if (pci_request_regions(pdev, "sk98lin") != 0) { 298 retval = pci_request_regions(pdev, "sk98lin");
303 retval = 2; 299 if (retval)
304 goto out_disable; 300 goto out;
305 }
306 301
307#ifdef SK_BIG_ENDIAN 302#ifdef SK_BIG_ENDIAN
308 /* 303 /*
@@ -321,9 +316,8 @@ static __devinit int SkGeInitPCI(SK_AC *pAC)
321 * Remap the regs into kernel space. 316 * Remap the regs into kernel space.
322 */ 317 */
323 pAC->IoBase = ioremap_nocache(dev->mem_start, 0x4000); 318 pAC->IoBase = ioremap_nocache(dev->mem_start, 0x4000);
324 319 if (!pAC->IoBase) {
325 if (!pAC->IoBase){ 320 retval = -EIO;
326 retval = 3;
327 goto out_release; 321 goto out_release;
328 } 322 }
329 323
@@ -331,8 +325,7 @@ static __devinit int SkGeInitPCI(SK_AC *pAC)
331 325
332 out_release: 326 out_release:
333 pci_release_regions(pdev); 327 pci_release_regions(pdev);
334 out_disable: 328 out:
335 pci_disable_device(pdev);
336 return retval; 329 return retval;
337} 330}
338 331