* [PATCH -next] scsi: fnic: Remove unneeded if-null-free check
@ 2021-06-01 14:20 Zheng Yongjun
0 siblings, 0 replies; only message in thread
From: Zheng Yongjun @ 2021-06-01 14:20 UTC (permalink / raw)
To: jejb, martin.petersen, linux-scsi, linux-kernel
Cc: satishkh, sebaddel, kartilak, Zheng Yongjun
Eliminate the following coccicheck warning:
drivers/scsi/fnic/fnic_debugfs.c:90:2-7: WARNING:
NULL check before some freeing functions is not needed.
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
drivers/scsi/fnic/fnic_debugfs.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/scsi/fnic/fnic_debugfs.c b/drivers/scsi/fnic/fnic_debugfs.c
index e7326505cabb..866b4c983ace 100644
--- a/drivers/scsi/fnic/fnic_debugfs.c
+++ b/drivers/scsi/fnic/fnic_debugfs.c
@@ -86,8 +86,7 @@ void fnic_debugfs_terminate(void)
debugfs_remove(fnic_trace_debugfs_root);
fnic_trace_debugfs_root = NULL;
- if (fc_trc_flag)
- vfree(fc_trc_flag);
+ vfree(fc_trc_flag);
}
/*
--
2.25.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-06-01 14:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-01 14:20 [PATCH -next] scsi: fnic: Remove unneeded if-null-free check Zheng Yongjun
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).