From: Yuesong Li Date: Thu, 22 Aug 2024 02:14:00 +0000 (+0800) Subject: dm bufio: Remove NULL check of list_entry() X-Git-Tag: v6.12-rc1~30^2~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=02c0207ecdcc9abdf3442676154f8fd2be0f649a;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Mikulas Patocka --- diff --git a/drivers/md/dm-bufio.c b/drivers/md/dm-bufio.c index 098bf526136c9..d478aafa02c97 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); }