summaryrefslogtreecommitdiff
path: root/drivers/scsi/bfa/bfad_debugfs.c
diff options
context:
space:
mode:
authorHaowen Bai <baihaowen@meizu.com>2022-03-15 04:57:14 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2022-04-26 06:23:05 +0300
commit8e897c84661e67e30c0c57dd4d25e18869958951 (patch)
treede54c2f409b8820baf9715e3b9d80538465f736b /drivers/scsi/bfa/bfad_debugfs.c
parent1dcd96c4d0b726df1155066126e029cb17a6dd3d (diff)
downloadlinux-8e897c84661e67e30c0c57dd4d25e18869958951.tar.xz
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>
Diffstat (limited to 'drivers/scsi/bfa/bfad_debugfs.c')
-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);