diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-07-24 03:38:13 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-07-24 03:38:13 -0400 |
commit | b71426eb10d904d421b36f51f93c8d0ba558edac (patch) | |
tree | a8c7088a6b89499134e01750652aa55f2baa890f /net/wanrouter/wanmain.c | |
parent | 8419dc8a34d765f2ff1aa4051084d54cfeff09cf (diff) | |
parent | abb5a5cc6bba1516403146c5b79036fe843beb70 (diff) | |
download | blackbird-op-linux-b71426eb10d904d421b36f51f93c8d0ba558edac.tar.gz blackbird-op-linux-b71426eb10d904d421b36f51f93c8d0ba558edac.zip |
Merge branch 'master' into upstream-fixes
Diffstat (limited to 'net/wanrouter/wanmain.c')
-rw-r--r-- | net/wanrouter/wanmain.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/net/wanrouter/wanmain.c b/net/wanrouter/wanmain.c index ad8e8a797790..9479659277ae 100644 --- a/net/wanrouter/wanmain.c +++ b/net/wanrouter/wanmain.c @@ -642,18 +642,16 @@ static int wanrouter_device_new_if(struct wan_device *wandev, if (cnf->config_id == WANCONFIG_MPPP) { #ifdef CONFIG_WANPIPE_MULTPPP - pppdev = kmalloc(sizeof(struct ppp_device), GFP_KERNEL); + pppdev = kzalloc(sizeof(struct ppp_device), GFP_KERNEL); err = -ENOBUFS; if (pppdev == NULL) goto out; - memset(pppdev, 0, sizeof(struct ppp_device)); - pppdev->dev = kmalloc(sizeof(struct net_device), GFP_KERNEL); + pppdev->dev = kzalloc(sizeof(struct net_device), GFP_KERNEL); if (pppdev->dev == NULL) { kfree(pppdev); err = -ENOBUFS; goto out; } - memset(pppdev->dev, 0, sizeof(struct net_device)); err = wandev->new_if(wandev, (struct net_device *)pppdev, cnf); dev = pppdev->dev; #else @@ -663,11 +661,10 @@ static int wanrouter_device_new_if(struct wan_device *wandev, goto out; #endif } else { - dev = kmalloc(sizeof(struct net_device), GFP_KERNEL); + dev = kzalloc(sizeof(struct net_device), GFP_KERNEL); err = -ENOBUFS; if (dev == NULL) goto out; - memset(dev, 0, sizeof(struct net_device)); err = wandev->new_if(wandev, dev, cnf); } |