projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
65fb1b0
)
lightnvm: fix unnecessary NULL check warnings
author
Tian Tao
<tiantao6@hisilicon.com>
Sun, 14 Feb 2021 10:31:02 +0000
(10:31 +0000)
committer
Jens Axboe
<axboe@kernel.dk>
Mon, 15 Feb 2021 04:27:24 +0000
(21:27 -0700)
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>
drivers/lightnvm/pblk-gc.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/lightnvm/pblk-gc.c
b/drivers/lightnvm/pblk-gc.c
index 2581eebcfc41d5d4363a62ba457fae15152d3090..b31658be35a7bb72e890333fa4b0f327c87abd0a 100644
(file)
--- 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);
}