Message ID | 1647309434-13936-1-git-send-email-baihaowen@meizu.com |
---|---|
State | New |
Headers | show |
Series | scsi: bfa: remove redundant NULL check | expand |
On Tue, 15 Mar 2022 09:57:14 +0800, Haowen Bai wrote: > Fix below warnings reported by coccicheck: > drivers/scsi/bfa/bfad_debugfs.c:375:2-7: WARNING: NULL check before some freeing functions is not needed. > > Applied to 5.19/scsi-queue, thanks! [1/1] scsi: bfa: remove redundant NULL check https://git.kernel.org/mkp/scsi/c/8e897c84661e
diff --git a/drivers/scsi/bfa/bfad_debugfs.c b/drivers/scsi/bfa/bfad_debugfs.c index fd1b378..52db147 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);
Fix below warnings reported by coccicheck: drivers/scsi/bfa/bfad_debugfs.c:375:2-7: WARNING: NULL check before some freeing functions is not needed. Signed-off-by: Haowen Bai <baihaowen@meizu.com> --- drivers/scsi/bfa/bfad_debugfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)