Commit 4cf29e43 authored by Tian Tao's avatar Tian Tao Committed by Jens Axboe

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: default avatarTian Tao <tiantao6@hisilicon.com>
Signed-off-by: default avatarMatias Bjørling <matias.bjorling@wdc.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 65fb1b0d
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
static void pblk_gc_free_gc_rq(struct pblk_gc_rq *gc_rq) static void pblk_gc_free_gc_rq(struct pblk_gc_rq *gc_rq)
{ {
if (gc_rq->data)
vfree(gc_rq->data); vfree(gc_rq->data);
kfree(gc_rq); kfree(gc_rq);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment