From: Dan Carpenter Date: Wed, 26 Aug 2020 11:33:30 +0000 (+0300) Subject: dma-pool: Fix an uninitialized variable bug in atomic_pool_expand() X-Git-Tag: v5.10.7~1742^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=892fc9f6835ecf075efac20789b012c5c9997fcc;p=platform%2Fkernel%2Flinux-rpi.git dma-pool: Fix an uninitialized variable bug in atomic_pool_expand() The "page" pointer can be used with out being initialized. Fixes: d7e673ec2c8e ("dma-pool: Only allocate from CMA when in same memory zone") Signed-off-by: Dan Carpenter Signed-off-by: Christoph Hellwig --- diff --git a/kernel/dma/pool.c b/kernel/dma/pool.c index 06582b488e31..1281c0f0442b 100644 --- a/kernel/dma/pool.c +++ b/kernel/dma/pool.c @@ -84,7 +84,7 @@ static int atomic_pool_expand(struct gen_pool *pool, size_t pool_size, gfp_t gfp) { unsigned int order; - struct page *page; + struct page *page = NULL; void *addr; int ret = -ENOMEM;