summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--block/blk-zoned.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/block/blk-zoned.c b/block/blk-zoned.c
index 667f95d86695..472211fa183a 100644
--- a/block/blk-zoned.c
+++ b/block/blk-zoned.c
@@ -80,7 +80,7 @@ int blkdev_report_zones(struct block_device *bdev,
unsigned int i, n, nz;
unsigned int ofst;
void *addr;
- int ret = 0;
+ int ret;
if (!q)
return -ENXIO;
@@ -179,14 +179,12 @@ int blkdev_report_zones(struct block_device *bdev,
}
+ *nr_zones = nz;
out:
bio_for_each_segment_all(bv, bio, i)
__free_page(bv->bv_page);
bio_put(bio);
- if (ret == 0)
- *nr_zones = nz;
-
return ret;
}
EXPORT_SYMBOL_GPL(blkdev_report_zones);