diff options
author | Mariusz Kozlowski <m.kozlowski@tuxland.pl> | 2007-08-11 00:24:50 +0200 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-08-14 07:52:11 +0200 |
commit | 1ee325438cdbe374ebea6e3d2f19204072c15038 (patch) | |
tree | f94ff6a6ecacdebc53fd04d7b728809f4e48c961 /drivers/net/wan/hdlc_fr.c | |
parent | [DCCP]: fix memory leak and clean up style - dccp_feat_empty_confirm() (diff) | |
download | linux-1ee325438cdbe374ebea6e3d2f19204072c15038.tar.xz linux-1ee325438cdbe374ebea6e3d2f19204072c15038.zip |
[WAN] drivers/net/wan/hdlc_fr.c: kmalloc + memset conversion to kzalloc
drivers/net/wan/hdlc_fr.c | 31260 -> 31223 (-37 bytes)
drivers/net/wan/hdlc_fr.o | 144872 -> 144728 (-144 bytes)
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Acked-by: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'drivers/net/wan/hdlc_fr.c')
-rw-r--r-- | drivers/net/wan/hdlc_fr.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/wan/hdlc_fr.c b/drivers/net/wan/hdlc_fr.c index 15b6e07a4382..071a64cacd5c 100644 --- a/drivers/net/wan/hdlc_fr.c +++ b/drivers/net/wan/hdlc_fr.c @@ -212,14 +212,13 @@ static pvc_device* add_pvc(struct net_device *dev, u16 dlci) pvc_p = &(*pvc_p)->next; } - pvc = kmalloc(sizeof(pvc_device), GFP_ATOMIC); + pvc = kzalloc(sizeof(pvc_device), GFP_ATOMIC); #ifdef DEBUG_PVC printk(KERN_DEBUG "add_pvc: allocated pvc %p, frad %p\n", pvc, dev); #endif if (!pvc) return NULL; - memset(pvc, 0, sizeof(pvc_device)); pvc->dlci = dlci; pvc->frad = dev; pvc->next = *pvc_p; /* Put it in the chain */ |