Skip to content

Commit 892fc9f

Browse files
Dan CarpenterChristoph Hellwig
authored andcommitted
dma-pool: Fix an uninitialized variable bug in atomic_pool_expand()
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>
1 parent 15bc20c commit 892fc9f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

kernel/dma/pool.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ static int atomic_pool_expand(struct gen_pool *pool, size_t pool_size,
8484
gfp_t gfp)
8585
{
8686
unsigned int order;
87-
struct page *page;
87+
struct page *page = NULL;
8888
void *addr;
8989
int ret = -ENOMEM;
9090

0 commit comments

Comments
 (0)