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>] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 11 Dec 2020 11:16:15 +0100 (CET)
From:   Julia Lawall <julia.lawall@...ia.fr>
To:     Kashyap Desai <kashyap.desai@...adcom.com>,
        Sumit Saxena <sumit.saxena@...adcom.com>,
        Shivasharan S <shivasharan.srikanteshwara@...adcom.com>,
        "James E.J. Bottomley" <jejb@...ux.ibm.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>
cc:     megaraidlinux.pdl@...adcom.com, linux-scsi@...r.kernel.org,
        linux-kernel@...r.kernel.org, kbuild-all@...ts.01.org,
        Denis Efremov <efremov@...ux.com>
Subject: [PATCH] scsi: megaraid: fix ifnullfree.cocci warnings

From: kernel test robot <lkp@...el.com>

NULL check before vfree is not needed.

Generated by: scripts/coccinelle/free/ifnullfree.cocci

Reported-by: kernel test robot <lkp@...el.com>
Signed-off-by: kernel test robot <lkp@...el.com>
Signed-off-by: Julia Lawall <julia.lawall@...ia.fr>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   33dc9614dc208291d0c4bcdeb5d30d481dcd2c4c
commit: 5e0c074e5b4be02d57d1b60abc3391afe7edd088 coccinelle: ifnullfree: add vfree(), kvfree*() functions
:::::: branch date: 3 hours ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 megaraid_sas_fusion.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
@@ -3917,8 +3917,7 @@ megasas_free_host_crash_buffer(struct me
 {
 	unsigned int i;
 	for (i = 0; i < instance->drv_buf_alloc; i++) {
-		if (instance->crash_buf[i])
-			vfree(instance->crash_buf[i]);
+		vfree(instance->crash_buf[i]);
 	}
 	instance->drv_buf_index = 0;
 	instance->drv_buf_alloc = 0;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ