summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2020-08-26 14:33:30 +0300
committerChristoph Hellwig <hch@lst.de>2020-08-27 09:22:56 +0200
commit892fc9f6835ecf075efac20789b012c5c9997fcc (patch)
tree6514c52462eb79f0a33c7f8058936e5154661a94 /kernel
parent15bc20c6af4ceee97a1f90b43c0e386643c071b4 (diff)
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 <dan.carpenter@oracle.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/dma/pool.c2
1 files changed, 1 insertions, 1 deletions
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;