]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
dm bufio: Remove NULL check of list_entry()
authorYuesong Li <liyuesong@vivo.com>
Thu, 22 Aug 2024 02:14:00 +0000 (10:14 +0800)
committerMikulas Patocka <mpatocka@redhat.com>
Thu, 22 Aug 2024 16:32:55 +0000 (18:32 +0200)
list_entry() will never return a NULL pointer, thus remove the
check.

Signed-off-by: Yuesong Li <liyuesong@vivo.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
drivers/md/dm-bufio.c

index 098bf526136c942508b4e6bf302ad4cc5c5c1399..d478aafa02c97fc5b3c0cfea207a9947debbb0c8 100644 (file)
@@ -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);
 }