diff options
Diffstat (limited to 'drivers/net/wan/n2.c')
-rw-r--r-- | drivers/net/wan/n2.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/wan/n2.c b/drivers/net/wan/n2.c index 5c322dfb79f6..cbdf0b748bde 100644 --- a/drivers/net/wan/n2.c +++ b/drivers/net/wan/n2.c | |||
@@ -351,12 +351,11 @@ static int __init n2_run(unsigned long io, unsigned long irq, | |||
351 | return -ENODEV; | 351 | return -ENODEV; |
352 | } | 352 | } |
353 | 353 | ||
354 | card = kmalloc(sizeof(card_t), GFP_KERNEL); | 354 | card = kzalloc(sizeof(card_t), GFP_KERNEL); |
355 | if (card == NULL) { | 355 | if (card == NULL) { |
356 | printk(KERN_ERR "n2: unable to allocate memory\n"); | 356 | printk(KERN_ERR "n2: unable to allocate memory\n"); |
357 | return -ENOBUFS; | 357 | return -ENOBUFS; |
358 | } | 358 | } |
359 | memset(card, 0, sizeof(card_t)); | ||
360 | 359 | ||
361 | card->ports[0].dev = alloc_hdlcdev(&card->ports[0]); | 360 | card->ports[0].dev = alloc_hdlcdev(&card->ports[0]); |
362 | card->ports[1].dev = alloc_hdlcdev(&card->ports[1]); | 361 | card->ports[1].dev = alloc_hdlcdev(&card->ports[1]); |