提交 4cf29e43 编写于 作者: T Tian Tao 提交者: 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: NTian Tao <tiantao6@hisilicon.com>
Signed-off-by: NMatias Bjørling <matias.bjorling@wdc.com>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册