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
/
wan
/
n2.c
diff --git
a/drivers/net/wan/n2.c
b/drivers/net/wan/n2.c
index
cd32751
..
5c322df
100644
(file)
--- a/
drivers/net/wan/n2.c
+++ b/
drivers/net/wan/n2.c
@@
-7,7
+7,7
@@
* under the terms of version 2 of the GNU General Public License
* as published by the Free Software Foundation.
*
* under the terms of version 2 of the GNU General Public License
* as published by the Free Software Foundation.
*
- * For information see
http://hq.pm.waw.pl/hdlc/
+ * For information see
<http://www.kernel.org/pub/linux/utils/net/hdlc/>
*
* Note: integrated CSU/DSU/DDS are not supported by this driver
*
*
* Note: integrated CSU/DSU/DDS are not supported by this driver
*
@@
-387,6
+387,11
@@
static int __init n2_run(unsigned long io, unsigned long irq,
}
card->phy_winbase = winbase;
card->winbase = ioremap(winbase, USE_WINDOWSIZE);
}
card->phy_winbase = winbase;
card->winbase = ioremap(winbase, USE_WINDOWSIZE);
+ if (!card->winbase) {
+ printk(KERN_ERR "n2: ioremap() failed\n");
+ n2_destroy_card(card);
+ return -EFAULT;
+ }
outb(0, io + N2_PCR);
outb(winbase >> 12, io + N2_BAR);
outb(0, io + N2_PCR);
outb(winbase >> 12, io + N2_BAR);
@@
-495,7
+500,7
@@
static int __init n2_init(void)
#ifdef MODULE
printk(KERN_INFO "n2: no card initialized\n");
#endif
#ifdef MODULE
printk(KERN_INFO "n2: no card initialized\n");
#endif
- return -E
NOSYS
; /* no parameters specified, abort */
+ return -E
INVAL
; /* no parameters specified, abort */
}
printk(KERN_INFO "%s\n", version);
}
printk(KERN_INFO "%s\n", version);
@@
-533,11
+538,11
@@
static int __init n2_init(void)
n2_run(io, irq, ram, valid[0], valid[1]);
if (*hw == '\x0')
n2_run(io, irq, ram, valid[0], valid[1]);
if (*hw == '\x0')
- return first_card ? 0 : -E
NOSYS
;
+ return first_card ? 0 : -E
INVAL
;
}while(*hw++ == ':');
printk(KERN_ERR "n2: invalid hardware parameters\n");
}while(*hw++ == ':');
printk(KERN_ERR "n2: invalid hardware parameters\n");
- return first_card ? 0 : -E
NOSYS
;
+ return first_card ? 0 : -E
INVAL
;
}
}
@@
-559,4
+564,5
@@
module_exit(n2_cleanup);
MODULE_AUTHOR("Krzysztof Halasa <khc@pm.waw.pl>");
MODULE_DESCRIPTION("RISCom/N2 serial port driver");
MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Krzysztof Halasa <khc@pm.waw.pl>");
MODULE_DESCRIPTION("RISCom/N2 serial port driver");
MODULE_LICENSE("GPL v2");
-module_param(hw, charp, 0444); /* hw=io,irq,ram,ports:io,irq,... */
+module_param(hw, charp, 0444);
+MODULE_PARM_DESC(hw, "io,irq,ram,ports:io,irq,...");