]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[WAN] drivers/net/wan/hdlc_fr.c: kmalloc + memset conversion to kzalloc
authorMariusz Kozlowski <m.kozlowski@tuxland.pl>
Fri, 10 Aug 2007 22:24:50 +0000 (15:24 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Tue, 14 Aug 2007 05:52:11 +0000 (22:52 -0700)
 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>
drivers/net/wan/hdlc_fr.c

index 15b6e07a4382020a4d8fc9aaeb721c3dd0953732..071a64cacd5c29cdedfc959c922bea885a7a7cc2 100644 (file)
@@ -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 */