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: <alpine.DEB.2.22.394.2203260934040.3141@hadrien>
Date:   Sat, 26 Mar 2022 09:35:43 +0100 (CET)
From:   Julia Lawall <julia.lawall@...ia.fr>
To:     Bart Van Assche <bvanassche@....org>
cc:     linux-kernel@...r.kernel.org, kbuild-all@...ts.01.org
Subject: [PATCH] scsi: ufs: fix itnull.cocci warnings

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

list_for_each_entry binds rgn to an entry, which cannot be NULL.  So
remove the first test.

Generated by: scripts/coccinelle/iterators/itnull.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://github.com/bvanassche/linux ufs-for-next
head:   b93e987f91a0c037fc4357107f5144110cd84d08
commit: b93e987f91a0c037fc4357107f5144110cd84d08 [324/324] scsi: ufs: Split the drivers/scsi/ufs directory
:::::: branch date: 11 hours ago
:::::: commit date: 11 hours ago

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

 drivers/scsi/ufs-core/ufshpb.c |    6 ------
 1 file changed, 6 deletions(-)

--- a/drivers/scsi/ufs-core/ufshpb.c
+++ b/drivers/scsi/ufs-core/ufshpb.c
@@ -875,12 +875,6 @@ static struct ufshpb_region *ufshpb_vict
 	struct ufshpb_region *rgn, *victim_rgn = NULL;

 	list_for_each_entry(rgn, &lru_info->lh_lru_rgn, list_lru_rgn) {
-		if (!rgn) {
-			dev_err(&hpb->sdev_ufs_lu->sdev_dev,
-				"%s: no region allocated\n",
-				__func__);
-			return NULL;
-		}
 		if (ufshpb_check_srgns_issue_state(hpb, rgn))
 			continue;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ