aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/slip.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/slip.c')
-rw-r--r--drivers/net/slip.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/slip.c b/drivers/net/slip.c
index a0806d262fc6..2f4b1de7a2b4 100644
--- a/drivers/net/slip.c
+++ b/drivers/net/slip.c
@@ -1343,15 +1343,12 @@ static int __init slip_init(void)
1343 printk(KERN_INFO "SLIP linefill/keepalive option.\n"); 1343 printk(KERN_INFO "SLIP linefill/keepalive option.\n");
1344#endif 1344#endif
1345 1345
1346 slip_devs = kmalloc(sizeof(struct net_device *)*slip_maxdev, GFP_KERNEL); 1346 slip_devs = kzalloc(sizeof(struct net_device *)*slip_maxdev, GFP_KERNEL);
1347 if (!slip_devs) { 1347 if (!slip_devs) {
1348 printk(KERN_ERR "SLIP: Can't allocate slip devices array! Uaargh! (-> No SLIP available)\n"); 1348 printk(KERN_ERR "SLIP: Can't allocate slip devices array! Uaargh! (-> No SLIP available)\n");
1349 return -ENOMEM; 1349 return -ENOMEM;
1350 } 1350 }
1351 1351
1352 /* Clear the pointer array, we allocate devices when we need them */
1353 memset(slip_devs, 0, sizeof(struct net_device *)*slip_maxdev);
1354
1355 /* Fill in our line protocol discipline, and register it */ 1352 /* Fill in our line protocol discipline, and register it */
1356 if ((status = tty_register_ldisc(N_SLIP, &sl_ldisc)) != 0) { 1353 if ((status = tty_register_ldisc(N_SLIP, &sl_ldisc)) != 0) {
1357 printk(KERN_ERR "SLIP: can't register line discipline (err = %d)\n", status); 1354 printk(KERN_ERR "SLIP: can't register line discipline (err = %d)\n", status);