summaryrefslogtreecommitdiff
path: root/drivers/md
diff options
context:
space:
mode:
authorYuesong Li <liyuesong@vivo.com>2024-08-22 10:14:00 +0800
committerMikulas Patocka <mpatocka@redhat.com>2024-08-22 18:32:55 +0200
commit02c0207ecdcc9abdf3442676154f8fd2be0f649a (patch)
treeba9d7e474a966505c43f5b8ee28e4cc37531df7e /drivers/md
parent4441686b24a1d7acf9834ca95864d67e3f97666a (diff)
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@vivo.com> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm-bufio.c3
1 files changed, 0 insertions, 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);
}