Skip to content

Commit

Permalink
drivers/net/sb1250-mac.c: kmalloc + memset conversion to kcalloc
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mariusz Kozlowski authored and David S. Miller committed Oct 10, 2007
1 parent a967b14 commit c477f33
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/net/sb1250-mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
/*
Expand Down

0 comments on commit c477f33

Please sign in to comment.