projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1dcd96c
)
scsi: bfa: Remove redundant NULL check
author
Haowen Bai
<baihaowen@meizu.com>
Tue, 15 Mar 2022 01:57:14 +0000
(09:57 +0800)
committer
Martin K. Petersen
<martin.petersen@oracle.com>
Tue, 26 Apr 2022 03:23:05 +0000
(23:23 -0400)
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>
drivers/scsi/bfa/bfad_debugfs.c
patch
|
blob
|
history
diff --git
a/drivers/scsi/bfa/bfad_debugfs.c
b/drivers/scsi/bfa/bfad_debugfs.c
index
fd1b378
..
52db147
100644
(file)
--- 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);