aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/skge.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/skge.c')
-rw-r--r--drivers/net/skge.c3
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)
733 struct skge_element *e; 733 struct skge_element *e;
734 int i; 734 int i;
735 735
736 ring->start = kmalloc(sizeof(*e)*ring->count, GFP_KERNEL); 736 ring->start = kcalloc(sizeof(*e), ring->count, GFP_KERNEL);
737 if (!ring->start) 737 if (!ring->start)
738 return -ENOMEM; 738 return -ENOMEM;
739 739
740 for (i = 0, e = ring->start, d = vaddr; i < ring->count; i++, e++, d++) { 740 for (i = 0, e = ring->start, d = vaddr; i < ring->count; i++, e++, d++) {
741 e->desc = d; 741 e->desc = d;
742 e->skb = NULL;
743 if (i == ring->count - 1) { 742 if (i == ring->count - 1) {
744 e->next = ring->start; 743 e->next = ring->start;
745 d->next_offset = base; 744 d->next_offset = base;