diff options
Diffstat (limited to 'mm/mempool.c')
-rw-r--r-- | mm/mempool.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/mempool.c b/mm/mempool.c index cc1ca86dfc24..3e8f1fed0e1f 100644 --- a/mm/mempool.c +++ b/mm/mempool.c | |||
@@ -263,6 +263,9 @@ void mempool_free(void *element, mempool_t *pool) | |||
263 | { | 263 | { |
264 | unsigned long flags; | 264 | unsigned long flags; |
265 | 265 | ||
266 | if (unlikely(element == NULL)) | ||
267 | return; | ||
268 | |||
266 | smp_mb(); | 269 | smp_mb(); |
267 | if (pool->curr_nr < pool->min_nr) { | 270 | if (pool->curr_nr < pool->min_nr) { |
268 | spin_lock_irqsave(&pool->lock, flags); | 271 | spin_lock_irqsave(&pool->lock, flags); |