Skip to content
Snippets Groups Projects
Commit 4cf29e43 authored by Tian Tao's avatar Tian Tao Committed by Jens Axboe
Browse files

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
No related branches found
No related tags found
No related merge requests found
...@@ -23,8 +23,7 @@ ...@@ -23,8 +23,7 @@
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);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment