Skip to content

Commit

Permalink
dma-pool: Fix an uninitialized variable bug in atomic_pool_expand()
Browse files Browse the repository at this point in the history
The "page" pointer can be used with out being initialized.

Fixes: d7e673e ("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>
  • Loading branch information
Dan Carpenter authored and Christoph Hellwig committed Aug 27, 2020
1 parent 15bc20c commit 892fc9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/dma/pool.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 892fc9f

Please sign in to comment.