summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2020-08-26 13:33:30 +0200
committerChristoph Hellwig <hch@lst.de>2020-08-27 09:22:56 +0200
commit892fc9f6835ecf075efac20789b012c5c9997fcc (patch)
tree6514c52462eb79f0a33c7f8058936e5154661a94
parentMerge tag 'tty-5.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/greg... (diff)
downloadlinux-892fc9f6835ecf075efac20789b012c5c9997fcc.tar.xz
linux-892fc9f6835ecf075efac20789b012c5c9997fcc.zip
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>
-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;