Commit 1ee32543 authored by Mariusz Kozlowski's avatar Mariusz Kozlowski Committed by David S. Miller

[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: default avatarMariusz Kozlowski <m.kozlowski@tuxland.pl>
Acked-by: default avatarKrzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent e576de82
...@@ -212,14 +212,13 @@ static pvc_device* add_pvc(struct net_device *dev, u16 dlci) ...@@ -212,14 +212,13 @@ static pvc_device* add_pvc(struct net_device *dev, u16 dlci)
pvc_p = &(*pvc_p)->next; pvc_p = &(*pvc_p)->next;
} }
pvc = kmalloc(sizeof(pvc_device), GFP_ATOMIC); pvc = kzalloc(sizeof(pvc_device), GFP_ATOMIC);
#ifdef DEBUG_PVC #ifdef DEBUG_PVC
printk(KERN_DEBUG "add_pvc: allocated pvc %p, frad %p\n", pvc, dev); printk(KERN_DEBUG "add_pvc: allocated pvc %p, frad %p\n", pvc, dev);
#endif #endif
if (!pvc) if (!pvc)
return NULL; return NULL;
memset(pvc, 0, sizeof(pvc_device));
pvc->dlci = dlci; pvc->dlci = dlci;
pvc->frad = dev; pvc->frad = dev;
pvc->next = *pvc_p; /* Put it in the chain */ pvc->next = *pvc_p; /* Put it in the chain */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment