1
0
Fork 0

[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 <herbert@gondor.apana.org.au>
hifive-unleashed-5.1
Herbert Xu 2007-03-31 12:16:20 +10:00
parent ce20269d1e
commit 4ee531a3e6
1 changed files with 1 additions and 1 deletions

View File

@ -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;