Skip to contentSkip to conversation

skge: fix swapped kcalloc() arguments

PATCH In review Michael Buesch 2 participants 2 messages Aug 18, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 skge: fix swapped kcalloc() arguments

Hey Stephen,

Please push the following fix upstream.

--

/**
* kcalloc - allocate memory for an array. The memory is set to zero.
* @n: number of elements.
* @size: element size.
* @flags: the type of memory to allocate.
*/

drivers/net/skge.c +1 -1
Index: linux-2.6/drivers/net/skge.c
===================================================================
@@ -731,7 +731,7 @@
 	struct skge_element *e;
 	int i;
 
-	ring->start = kcalloc(sizeof(*e), ring->count, GFP_KERNEL);
+	ring->start = kcalloc(ring->count, sizeof(*e), GFP_KERNEL);
 	if (!ring->start)
 		return -ENOMEM;
 
Signature · 1 line
Greetings Michael.
#1 lore raw
Quoted 4 lines · On Fri, 18 Aug 2006 23:54:52 +0200 Michael Buesch <[email protected]> wrote:

Hey Stephen,

Please push the following fix upstream.

ok, but it can't make much difference, unless someone did something like try to set ring->count to zero.