summaryrefslogtreecommitdiff
path: root/crypto/scatterwalk.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/scatterwalk.c')
-rw-r--r--crypto/scatterwalk.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/crypto/scatterwalk.c b/crypto/scatterwalk.c
index 52aae2974794..2ec5368ed649 100644
--- a/crypto/scatterwalk.c
+++ b/crypto/scatterwalk.c
@@ -62,12 +62,8 @@ static void scatterwalk_pagedone(struct scatter_walk *walk, int out,
flush_dcache_page(page);
}
- if (more) {
- walk->offset += PAGE_SIZE - 1;
- walk->offset &= PAGE_MASK;
- if (walk->offset >= walk->sg->offset + walk->sg->length)
- scatterwalk_start(walk, sg_next(walk->sg));
- }
+ if (more && walk->offset >= walk->sg->offset + walk->sg->length)
+ scatterwalk_start(walk, sg_next(walk->sg));
}
void scatterwalk_done(struct scatter_walk *walk, int out, int more)