summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mm/dmapool.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/dmapool.c b/mm/dmapool.c
index 59d10d16f0a5..4b657099111f 100644
--- a/mm/dmapool.c
+++ b/mm/dmapool.c
@@ -271,6 +271,9 @@ void dma_pool_destroy(struct dma_pool *pool)
{
bool empty = false;
+ if (unlikely(!pool))
+ return;
+
mutex_lock(&pools_reg_lock);
mutex_lock(&pools_lock);
list_del(&pool->pools);