diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c index 5c3f6ac41728..5551f36c6462 100644 --- a/fs/erofs/zdata.c +++ b/fs/erofs/zdata.c @@ -1191,7 +1191,6 @@ static void z_erofs_submit_queue(struct super_block *sb, do { struct page *page; - int err; page = pickup_page_for_submission(pcl, i++, pagepool, MNGD_MAPPING(sbi), @@ -1217,8 +1216,7 @@ submit_bio_retry: ++nr_bios; } - err = bio_add_page(bio, page, PAGE_SIZE, 0); - if (err < PAGE_SIZE) + if (bio_add_page(bio, page, PAGE_SIZE, 0) < PAGE_SIZE) goto submit_bio_retry; last_index = cur;