summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorMichal Orzel <michalorzel.eng@gmail.com>2022-04-23 13:38:08 +0200
committerJens Axboe <axboe@kernel.dk>2022-04-23 07:15:26 -0600
commit7ab89db979017255c2163880de5c63d8c9726aef (patch)
tree72f26cc2ca713b3b5b35436292a03baf2cdc77eb /block
parent3de2e5f28cb133f1d9c1b2403079722d0e7b671e (diff)
block/blk-map: Remove redundant assignment
Get rid of redundant assignment to a variable ret from function bio_map_user_iov as it is being assigned a value that is never read. It is being re-assigned in the first instruction after the while loop Reported by clang-tidy [deadcode.DeadStores] Signed-off-by: Michal Orzel <michalorzel.eng@gmail.com> Link: https://lore.kernel.org/r/20220423113811.13335-2-michalorzel.eng@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r--block/blk-map.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/block/blk-map.c b/block/blk-map.c
index 7ffde64f9019..df8b066cd548 100644
--- a/block/blk-map.c
+++ b/block/blk-map.c
@@ -262,10 +262,9 @@ static int bio_map_user_iov(struct request *rq, struct iov_iter *iter,
npages = DIV_ROUND_UP(offs + bytes, PAGE_SIZE);
- if (unlikely(offs & queue_dma_alignment(rq->q))) {
- ret = -EINVAL;
+ if (unlikely(offs & queue_dma_alignment(rq->q)))
j = 0;
- } else {
+ else {
for (j = 0; j < npages; j++) {
struct page *page = pages[j];
unsigned int n = PAGE_SIZE - offs;