]> git.baikalelectronics.ru Git - kernel.git/commitdiff
scsi: fnic: Remove redundant NULL check
authorHaowen Bai <baihaowen@meizu.com>
Tue, 15 Mar 2022 01:53:39 +0000 (09:53 +0800)
committerMartin 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/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>
drivers/scsi/fnic/fnic_debugfs.c

index e7326505cabb15c6685592c43e1f74a6c4566967..866b4c983ace2b99e561e98f907a2394448ba7b5 100644 (file)
@@ -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);
 }
 
 /*