diff options
-rw-r--r-- | lib/genalloc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/genalloc.c b/lib/genalloc.c index 0fe1cbe87700..d214866eeea2 100644 --- a/lib/genalloc.c +++ b/lib/genalloc.c | |||
@@ -586,6 +586,8 @@ struct gen_pool *devm_gen_pool_create(struct device *dev, int min_alloc_order, | |||
586 | struct gen_pool **ptr, *pool; | 586 | struct gen_pool **ptr, *pool; |
587 | 587 | ||
588 | ptr = devres_alloc(devm_gen_pool_release, sizeof(*ptr), GFP_KERNEL); | 588 | ptr = devres_alloc(devm_gen_pool_release, sizeof(*ptr), GFP_KERNEL); |
589 | if (!ptr) | ||
590 | return NULL; | ||
589 | 591 | ||
590 | pool = gen_pool_create(min_alloc_order, nid); | 592 | pool = gen_pool_create(min_alloc_order, nid); |
591 | if (pool) { | 593 | if (pool) { |