aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaowen Bai2022-03-15 09:57:14 +0800
committerMartin K. Petersen2022-04-25 23:23:05 -0400
commit8e897c84661e67e30c0c57dd4d25e18869958951 (patch)
treede54c2f409b8820baf9715e3b9d80538465f736b
parent1dcd96c4d0b726df1155066126e029cb17a6dd3d (diff)
scsi: bfa: Remove redundant NULL check
Fix the following warning reported by coccicheck: drivers/scsi/bfa/bfad_debugfs.c:375:2-7: WARNING: NULL check before some freeing functions is not needed. Link: https://lore.kernel.org/r/1647309434-13936-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>
-rw-r--r--drivers/scsi/bfa/bfad_debugfs.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/bfa/bfad_debugfs.c b/drivers/scsi/bfa/bfad_debugfs.c
index fd1b378a263a..52db147d9979 100644
--- a/drivers/scsi/bfa/bfad_debugfs.c
+++ b/drivers/scsi/bfa/bfad_debugfs.c
@@ -371,8 +371,7 @@ bfad_debugfs_release_fwtrc(struct inode *inode, struct file *file)
if (!fw_debug)
return 0;
- if (fw_debug->debug_buffer)
- vfree(fw_debug->debug_buffer);
+ vfree(fw_debug->debug_buffer);
file->private_data = NULL;
kfree(fw_debug);