diff options
Diffstat (limited to 'drivers/net/wan/x25_asy.c')
-rw-r--r-- | drivers/net/wan/x25_asy.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c index 1c9edd97accd..c48b1cc63fd5 100644 --- a/drivers/net/wan/x25_asy.c +++ b/drivers/net/wan/x25_asy.c | |||
@@ -786,14 +786,12 @@ static int __init init_x25_asy(void) | |||
786 | printk(KERN_INFO "X.25 async: version 0.00 ALPHA " | 786 | printk(KERN_INFO "X.25 async: version 0.00 ALPHA " |
787 | "(dynamic channels, max=%d).\n", x25_asy_maxdev ); | 787 | "(dynamic channels, max=%d).\n", x25_asy_maxdev ); |
788 | 788 | ||
789 | x25_asy_devs = kmalloc(sizeof(struct net_device *)*x25_asy_maxdev, | 789 | x25_asy_devs = kcalloc(x25_asy_maxdev, sizeof(struct net_device*), GFP_KERNEL); |
790 | GFP_KERNEL); | ||
791 | if (!x25_asy_devs) { | 790 | if (!x25_asy_devs) { |
792 | printk(KERN_WARNING "X25 async: Can't allocate x25_asy_ctrls[] " | 791 | printk(KERN_WARNING "X25 async: Can't allocate x25_asy_ctrls[] " |
793 | "array! Uaargh! (-> No X.25 available)\n"); | 792 | "array! Uaargh! (-> No X.25 available)\n"); |
794 | return -ENOMEM; | 793 | return -ENOMEM; |
795 | } | 794 | } |
796 | memset(x25_asy_devs, 0, sizeof(struct net_device *)*x25_asy_maxdev); | ||
797 | 795 | ||
798 | return tty_register_ldisc(N_X25, &x25_ldisc); | 796 | return tty_register_ldisc(N_X25, &x25_ldisc); |
799 | } | 797 | } |