aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tokenring/proteon.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/tokenring/proteon.c')
-rw-r--r--drivers/net/tokenring/proteon.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/tokenring/proteon.c b/drivers/net/tokenring/proteon.c
index 4f756960db2a..cb7dbb63c9d9 100644
--- a/drivers/net/tokenring/proteon.c
+++ b/drivers/net/tokenring/proteon.c
@@ -370,6 +370,10 @@ static int __init proteon_init(void)
370 dev->dma = dma[i]; 370 dev->dma = dma[i];
371 pdev = platform_device_register_simple("proteon", 371 pdev = platform_device_register_simple("proteon",
372 i, NULL, 0); 372 i, NULL, 0);
373 if (IS_ERR(pdev)) {
374 free_netdev(dev);
375 continue;
376 }
373 err = setup_card(dev, &pdev->dev); 377 err = setup_card(dev, &pdev->dev);
374 if (!err) { 378 if (!err) {
375 proteon_dev[i] = pdev; 379 proteon_dev[i] = pdev;
@@ -385,9 +389,10 @@ static int __init proteon_init(void)
385 /* Probe for cards. */ 389 /* Probe for cards. */
386 if (num == 0) { 390 if (num == 0) {
387 printk(KERN_NOTICE "proteon.c: No cards found.\n"); 391 printk(KERN_NOTICE "proteon.c: No cards found.\n");
388 return (-ENODEV); 392 platform_driver_unregister(&proteon_driver);
393 return -ENODEV;
389 } 394 }
390 return (0); 395 return 0;
391} 396}
392 397
393static void __exit proteon_cleanup(void) 398static void __exit proteon_cleanup(void)