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: <20240822021400.1193855-1-liyuesong@vivo.com>
Date: Thu, 22 Aug 2024 10:14:00 +0800
From: Yuesong Li <liyuesong@...o.com>
To: agk@...hat.com,
	snitzer@...nel.org,
	mpatocka@...hat.com
Cc: dm-devel@...ts.linux.dev,
	linux-kernel@...r.kernel.org,
	opensource.kernel@...o.com,
	Yuesong Li <liyuesong@...o.com>
Subject: [PATCH v1] driver:md:dm-bufio:Remove NULL check of list_entry()

list_entry() will never return a NULL pointer, thus remove the
check.

Signed-off-by: Yuesong Li <liyuesong@...o.com>
---
 drivers/md/dm-bufio.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/md/dm-bufio.c b/drivers/md/dm-bufio.c
index 098bf526136c..d478aafa02c9 100644
--- a/drivers/md/dm-bufio.c
+++ b/drivers/md/dm-bufio.c
@@ -529,9 +529,6 @@ static struct dm_buffer *list_to_buffer(struct list_head *l)
 {
 	struct lru_entry *le = list_entry(l, struct lru_entry, list);
 
-	if (!le)
-		return NULL;
-
 	return le_to_buffer(le);
 }
 
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ