summaryrefslogtreecommitdiff
path: root/crypto/skcipher.c
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2018-07-23 20:21:29 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2018-08-03 13:06:04 +0300
commit2a57c0be225f8c7140f8791819f5afbb6fb34c5a (patch)
treee254a27967c8b610ad6593a1c95ea193be9a759a /crypto/skcipher.c
parent3dd8cc00c34ab9cde4bcc808ebc607e7b9861280 (diff)
downloadlinux-2a57c0be225f8c7140f8791819f5afbb6fb34c5a.tar.xz
crypto: skcipher - remove unnecessary setting of walk->nbytes
Setting 'walk->nbytes = walk->total' in skcipher_walk_first() doesn't make sense because actually walk->nbytes needs to be set to the length of the first step in the walk, which may be less than walk->total. This is done by skcipher_walk_next() which is called immediately afterwards. Also walk->nbytes was already set to 0 in skcipher_walk_skcipher(), which is a better default value in case it's forgotten to be set later. Therefore, remove the unnecessary assignment to walk->nbytes. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/skcipher.c')
-rw-r--r--crypto/skcipher.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/crypto/skcipher.c b/crypto/skcipher.c
index 4f6b8dadaceb..835e5d36ad59 100644
--- a/crypto/skcipher.c
+++ b/crypto/skcipher.c
@@ -436,7 +436,6 @@ static int skcipher_walk_first(struct skcipher_walk *walk)
}
walk->page = NULL;
- walk->nbytes = walk->total;
return skcipher_walk_next(walk);
}