Skip to contentSkip to conversation

scsi: fnic: remove redundant NULL check

PATCH New Yang Li 1 participant 1 message Jan 22, 2021

Subsystems (2)
lore
Share & tools
lore

Yang Li

author
#0 lore raw

PATCH 1/1 scsi: fnic: remove redundant NULL check

Fix below warnings reported by coccicheck:
./drivers/scsi/fnic/fnic_debugfs.c:91:2-7: WARNING: NULL check before some freeing functions is not needed.

---
 drivers/scsi/fnic/fnic_debugfs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/scsi/fnic/fnic_debugfs.c +1 -2
index 6c04936..6dce1cd 100644
@@ -87,8 +87,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);
 }
 
 /*
Signature · 1 line
1.8.3.1