]> err.no Git - linux-2.6/commitdiff
drivers/net/sb1250-mac.c: kmalloc + memset conversion to kcalloc
authorMariusz Kozlowski <m.kozlowski@tuxland.pl>
Tue, 31 Jul 2007 21:58:36 +0000 (23:58 +0200)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 10 Oct 2007 23:50:21 +0000 (16:50 -0700)
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
 drivers/net/sb1250-mac.c | 76286 -> 76199 (-87 bytes)

 drivers/net/sb1250-mac.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/sb1250-mac.c

index 53845ebb649f69b796468c2304728fbf29618847..b6cafac972009cfb31f8b66bca06f83fbdea8095 100644 (file)
@@ -780,10 +780,8 @@ static void sbdma_initctx(sbmacdma_t *d,
         * And context table
         */
 
-       d->sbdma_ctxtable = (struct sk_buff **)
-               kmalloc(d->sbdma_maxdescr*sizeof(struct sk_buff *), GFP_KERNEL);
-
-       memset(d->sbdma_ctxtable,0,d->sbdma_maxdescr*sizeof(struct sk_buff *));
+       d->sbdma_ctxtable = kcalloc(d->sbdma_maxdescr,
+                                   sizeof(struct sk_buff *), GFP_KERNEL);
 
 #ifdef CONFIG_SBMAC_COALESCE
        /*