diff options
Diffstat (limited to 'net/netrom')
-rw-r--r-- | net/netrom/af_netrom.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c index 389a4119e1b4..ecc796878f38 100644 --- a/net/netrom/af_netrom.c +++ b/net/netrom/af_netrom.c | |||
@@ -1382,14 +1382,12 @@ static int __init nr_proto_init(void) | |||
1382 | return -1; | 1382 | return -1; |
1383 | } | 1383 | } |
1384 | 1384 | ||
1385 | dev_nr = kmalloc(nr_ndevs * sizeof(struct net_device *), GFP_KERNEL); | 1385 | dev_nr = kzalloc(nr_ndevs * sizeof(struct net_device *), GFP_KERNEL); |
1386 | if (dev_nr == NULL) { | 1386 | if (dev_nr == NULL) { |
1387 | printk(KERN_ERR "NET/ROM: nr_proto_init - unable to allocate device array\n"); | 1387 | printk(KERN_ERR "NET/ROM: nr_proto_init - unable to allocate device array\n"); |
1388 | return -1; | 1388 | return -1; |
1389 | } | 1389 | } |
1390 | 1390 | ||
1391 | memset(dev_nr, 0x00, nr_ndevs * sizeof(struct net_device *)); | ||
1392 | |||
1393 | for (i = 0; i < nr_ndevs; i++) { | 1391 | for (i = 0; i < nr_ndevs; i++) { |
1394 | char name[IFNAMSIZ]; | 1392 | char name[IFNAMSIZ]; |
1395 | struct net_device *dev; | 1393 | struct net_device *dev; |