Skip to content

Commit 02c0207

Browse files
Yuesong LiMikulas Patocka
authored andcommitted
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 <[email protected]> Signed-off-by: Mikulas Patocka <[email protected]>
1 parent 4441686 commit 02c0207

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

drivers/md/dm-bufio.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -529,9 +529,6 @@ static struct dm_buffer *list_to_buffer(struct list_head *l)
529529
{
530530
struct lru_entry *le = list_entry(l, struct lru_entry, list);
531531

532-
if (!le)
533-
return NULL;
534-
535532
return le_to_buffer(le);
536533
}
537534

0 commit comments

Comments
 (0)