summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHaowen Bai <baihaowen@meizu.com>2022-03-15 02:53:39 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2022-04-26 05:23:05 +0200
commit1dcd96c4d0b726df1155066126e029cb17a6dd3d (patch)
tree8ecc6bfc2e0302b9ab2e87d33076b0cae4322344 /drivers
parentscsi: mac53c94: Fix warning comparing pointer to 0 (diff)
downloadlinux-1dcd96c4d0b726df1155066126e029cb17a6dd3d.tar.xz
linux-1dcd96c4d0b726df1155066126e029cb17a6dd3d.zip
scsi: fnic: Remove redundant NULL check
Fix the following warning reported by coccicheck: drivers/scsi/fnic/fnic_debugfs.c:90:2-7: WARNING: NULL check before some freeing functions is not needed. Link: https://lore.kernel.org/r/1647309219-12772-1-git-send-email-baihaowen@meizu.com Signed-off-by: Haowen Bai <baihaowen@meizu.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/fnic/fnic_debugfs.c3
1 files changed, 1 insertions, 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);
}
/*