erofs: avoid unnecessary variable `err'
authorGao Xiang <hsiangkao@redhat.com>
Sat, 19 Sep 2020 07:27:28 +0000 (15:27 +0800)
committerGao Xiang <hsiangkao@redhat.com>
Sat, 19 Sep 2020 07:35:17 +0000 (15:35 +0800)
variable `err' in z_erofs_submit_queue() isn't useful
here, remove it instead.

Reviewed-by: Chao Yu <yuchao0@huawei.com>
Link: https://lore.kernel.org/r/20200919072730.24989-1-hsiangkao@redhat.com
Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
fs/erofs/zdata.c

index ac6cb73df192427357d34e9f059c295a783792b5..e43684b23fddeec2407f06bb4384473ff75d46f1 100644 (file)
@@ -1190,7 +1190,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),
@@ -1216,8 +1215,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;