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
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
drivers
/
net
/
tokenring
/
skisa.c
diff --git
a/drivers/net/tokenring/skisa.c
b/drivers/net/tokenring/skisa.c
index
d6ba41c
..
33afea3
100644
(file)
--- a/
drivers/net/tokenring/skisa.c
+++ b/
drivers/net/tokenring/skisa.c
@@
-380,6
+380,10
@@
static int __init sk_isa_init(void)
dev->dma = dma[i];
pdev = platform_device_register_simple("skisa",
i, NULL, 0);
dev->dma = dma[i];
pdev = platform_device_register_simple("skisa",
i, NULL, 0);
+ if (IS_ERR(pdev)) {
+ free_netdev(dev);
+ continue;
+ }
err = setup_card(dev, &pdev->dev);
if (!err) {
sk_isa_dev[i] = pdev;
err = setup_card(dev, &pdev->dev);
if (!err) {
sk_isa_dev[i] = pdev;
@@
-395,9
+399,10
@@
static int __init sk_isa_init(void)
/* Probe for cards. */
if (num == 0) {
printk(KERN_NOTICE "skisa.c: No cards found.\n");
/* Probe for cards. */
if (num == 0) {
printk(KERN_NOTICE "skisa.c: No cards found.\n");
- return (-ENODEV);
+ platform_driver_unregister(&sk_isa_driver);
+ return -ENODEV;
}
}
- return
(0)
;
+ return
0
;
}
static void __exit sk_isa_cleanup(void)
}
static void __exit sk_isa_cleanup(void)