Commit 7582c032 authored by Dave Jones's avatar Dave Jones

[PATCH] extra sanity checks for mempool

parent 95bc24fd
......@@ -34,6 +34,9 @@ mempool_t * mempool_create(int min_nr, mempool_alloc_t *alloc_fn,
mempool_t *pool;
int i;
BUG_ON(!alloc_fn);
BUG_ON(!free_fn);
pool = kmalloc(sizeof(*pool), GFP_KERNEL);
if (!pool)
return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment