From 4ee531a3e661207d4b2174486b0f86017a3adb82 Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Sat, 31 Mar 2007 12:16:20 +1000 Subject: [CRYPTO] api: Use the right value when advancing scatterwalk_copychunks In the scatterwalk_copychunks loop, We should be advancing by len_this_page and not nbytes. The latter is the total length. Signed-off-by: Herbert Xu --- crypto/scatterwalk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crypto') diff --git a/crypto/scatterwalk.c b/crypto/scatterwalk.c index a664231..0f76175 100644 --- a/crypto/scatterwalk.c +++ b/crypto/scatterwalk.c @@ -91,7 +91,7 @@ void scatterwalk_copychunks(void *buf, struct scatter_walk *walk, memcpy_dir(buf, vaddr, len_this_page, out); scatterwalk_unmap(vaddr, out); - scatterwalk_advance(walk, nbytes); + scatterwalk_advance(walk, len_this_page); if (nbytes == len_this_page) break; -- cgit v1.1