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

lightnvm: fix unnecessary NULL check warnings

Remove NULL checks before vfree() to fix these warnings:
./drivers/lightnvm/pblk-gc.c:27:2-7: WARNING: NULL check before some
freeing functions is not needed.

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Signed-off-by: Matias Bjørling <matias.bjorling@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Tian Tao and committed by
Jens Axboe
4cf29e43 65fb1b0d

+1 -2
+1 -2
drivers/lightnvm/pblk-gc.c
··· 23 23 24 24 static void pblk_gc_free_gc_rq(struct pblk_gc_rq *gc_rq) 25 25 { 26 - if (gc_rq->data) 27 - vfree(gc_rq->data); 26 + vfree(gc_rq->data); 28 27 kfree(gc_rq); 29 28 } 30 29