lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1611307910-115635-1-git-send-email-abaci-bugfix@linux.alibaba.com>
Date:   Fri, 22 Jan 2021 17:31:50 +0800
From:   Yang Li <abaci-bugfix@...ux.alibaba.com>
To:     jejb@...ux.ibm.com
Cc:     martin.petersen@...cle.com, satishkh@...co.com, sebaddel@...co.com,
        kartilak@...co.com, linux-scsi@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Yang Li <abaci-bugfix@...ux.alibaba.com>
Subject: [PATCH] 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.

Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
Signed-off-by: Yang Li <abaci-bugfix@...ux.alibaba.com>
---
 drivers/scsi/fnic/fnic_debugfs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/fnic/fnic_debugfs.c b/drivers/scsi/fnic/fnic_debugfs.c
index 6c04936..6dce1cd 100644
--- a/drivers/scsi/fnic/fnic_debugfs.c
+++ b/drivers/scsi/fnic/fnic_debugfs.c
@@ -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);
 }
 
 /*
-- 
1.8.3.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ