git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge to kernel-2.6.20-1.2949.fc6.vs2.2.0.1
[linux-2.6.git]
/
drivers
/
net
/
tokenring
/
proteon.c
diff --git
a/drivers/net/tokenring/proteon.c
b/drivers/net/tokenring/proteon.c
index
4f75696
..
cb7dbb6
100644
(file)
--- a/
drivers/net/tokenring/proteon.c
+++ b/
drivers/net/tokenring/proteon.c
@@
-370,6
+370,10
@@
static int __init proteon_init(void)
dev->dma = dma[i];
pdev = platform_device_register_simple("proteon",
i, NULL, 0);
dev->dma = dma[i];
pdev = platform_device_register_simple("proteon",
i, NULL, 0);
+ if (IS_ERR(pdev)) {
+ free_netdev(dev);
+ continue;
+ }
err = setup_card(dev, &pdev->dev);
if (!err) {
proteon_dev[i] = pdev;
err = setup_card(dev, &pdev->dev);
if (!err) {
proteon_dev[i] = pdev;
@@
-385,9
+389,10
@@
static int __init proteon_init(void)
/* Probe for cards. */
if (num == 0) {
printk(KERN_NOTICE "proteon.c: No cards found.\n");
/* Probe for cards. */
if (num == 0) {
printk(KERN_NOTICE "proteon.c: No cards found.\n");
- return (-ENODEV);
+ platform_driver_unregister(&proteon_driver);
+ return -ENODEV;
}
}
- return
(0)
;
+ return
0
;
}
static void __exit proteon_cleanup(void)
}
static void __exit proteon_cleanup(void)