Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dm vdo flush: initialize return to NULL in allocate_flush

Otherwise, error path could result in allocate_flush's subsequent
check for flush being non-NULL leading to false positive.

Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Susan LeGendre-McGhee <slegendr@redhat.com>
Signed-off-by: Matthew Sakai <msakai@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>

+1 -1
+1 -1
drivers/md/dm-vdo/flush.c
··· 100 100 101 101 static void *allocate_flush(gfp_t gfp_mask, void *pool_data) 102 102 { 103 - struct vdo_flush *flush; 103 + struct vdo_flush *flush = NULL; 104 104 105 105 if ((gfp_mask & GFP_NOWAIT) == GFP_NOWAIT) { 106 106 flush = uds_allocate_memory_nowait(sizeof(struct vdo_flush), __func__);