From: Stephen Hemminger Date: Tue, 21 Mar 2006 18:57:03 +0000 (-0800) Subject: [PATCH] skge: use kcalloc X-Git-Tag: v2.6.17-rc1~1169 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff7907aede7962629c2eb50e08b870316c80518f;p=linux-2.6 [PATCH] skge: use kcalloc Use kcalloc when allocating ring data structure. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/skge.c b/drivers/net/skge.c index 381669cc41..5ece10034d 100644 --- a/drivers/net/skge.c +++ b/drivers/net/skge.c @@ -733,13 +733,12 @@ static int skge_ring_alloc(struct skge_ring *ring, void *vaddr, u32 base) struct skge_element *e; int i; - ring->start = kmalloc(sizeof(*e)*ring->count, GFP_KERNEL); + ring->start = kcalloc(sizeof(*e), ring->count, GFP_KERNEL); if (!ring->start) return -ENOMEM; for (i = 0, e = ring->start, d = vaddr; i < ring->count; i++, e++, d++) { e->desc = d; - e->skb = NULL; if (i == ring->count - 1) { e->next = ring->start; d->next_offset = base;