summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTian Tao <tiantao6@hisilicon.com>2021-02-14 10:31:02 +0000
committerJens Axboe <axboe@kernel.dk>2021-02-14 21:27:24 -0700
commit4cf29e43afc0dea7ccf6b09a20bd598fad47bf60 (patch)
tree23180566202eb9ad39d1a0c5329adef48e6a3ea9
parent65fb1b0dbce84aaded750cbb6a8cb7783ae601eb (diff)
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>
-rw-r--r--drivers/lightnvm/pblk-gc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/lightnvm/pblk-gc.c b/drivers/lightnvm/pblk-gc.c
index 2581eebcfc41..b31658be35a7 100644
--- a/drivers/lightnvm/pblk-gc.c
+++ b/drivers/lightnvm/pblk-gc.c
@@ -23,8 +23,7 @@
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);
}