diff options
author | Stephen Hemminger <shemminger@osdl.org> | 2006-03-21 19:57:03 +0100 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-03-21 22:00:51 +0100 |
commit | ff7907aede7962629c2eb50e08b870316c80518f (patch) | |
tree | fd79519a2bb2738c0c28774a20004e257fbb2880 | |
parent | [PATCH] skge: dma configuration cleanup (diff) | |
download | linux-ff7907aede7962629c2eb50e08b870316c80518f.tar.xz linux-ff7907aede7962629c2eb50e08b870316c80518f.zip |
[PATCH] skge: use kcalloc
Use kcalloc when allocating ring data structure.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/skge.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/skge.c b/drivers/net/skge.c index 381669cc415f..5ece10034df9 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; |