diff options
| -rw-r--r-- | crypto/authenc.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/crypto/authenc.c b/crypto/authenc.c index 0b29a6ae673d..126a529b496d 100644 --- a/crypto/authenc.c +++ b/crypto/authenc.c | |||
| @@ -84,8 +84,8 @@ static int crypto_authenc_hash(struct aead_request *req) | |||
| 84 | .tfm = auth, | 84 | .tfm = auth, |
| 85 | }; | 85 | }; |
| 86 | u8 *hash = aead_request_ctx(req); | 86 | u8 *hash = aead_request_ctx(req); |
| 87 | struct scatterlist *dst; | 87 | struct scatterlist *dst = req->dst; |
| 88 | unsigned int cryptlen; | 88 | unsigned int cryptlen = req->cryptlen; |
| 89 | int err; | 89 | int err; |
| 90 | 90 | ||
| 91 | hash = (u8 *)ALIGN((unsigned long)hash + crypto_hash_alignmask(auth), | 91 | hash = (u8 *)ALIGN((unsigned long)hash + crypto_hash_alignmask(auth), |
| @@ -100,8 +100,6 @@ static int crypto_authenc_hash(struct aead_request *req) | |||
| 100 | if (err) | 100 | if (err) |
| 101 | goto auth_unlock; | 101 | goto auth_unlock; |
| 102 | 102 | ||
| 103 | cryptlen = req->cryptlen; | ||
| 104 | dst = req->dst; | ||
| 105 | err = crypto_hash_update(&desc, dst, cryptlen); | 103 | err = crypto_hash_update(&desc, dst, cryptlen); |
| 106 | if (err) | 104 | if (err) |
| 107 | goto auth_unlock; | 105 | goto auth_unlock; |
| @@ -159,8 +157,8 @@ static int crypto_authenc_verify(struct aead_request *req) | |||
| 159 | }; | 157 | }; |
| 160 | u8 *ohash = aead_request_ctx(req); | 158 | u8 *ohash = aead_request_ctx(req); |
| 161 | u8 *ihash; | 159 | u8 *ihash; |
| 162 | struct scatterlist *src; | 160 | struct scatterlist *src = req->src; |
| 163 | unsigned int cryptlen; | 161 | unsigned int cryptlen = req->cryptlen; |
| 164 | unsigned int authsize; | 162 | unsigned int authsize; |
| 165 | int err; | 163 | int err; |
| 166 | 164 | ||
| @@ -177,8 +175,6 @@ static int crypto_authenc_verify(struct aead_request *req) | |||
| 177 | if (err) | 175 | if (err) |
| 178 | goto auth_unlock; | 176 | goto auth_unlock; |
| 179 | 177 | ||
| 180 | cryptlen = req->cryptlen; | ||
| 181 | src = req->src; | ||
| 182 | err = crypto_hash_update(&desc, src, cryptlen); | 178 | err = crypto_hash_update(&desc, src, cryptlen); |
| 183 | if (err) | 179 | if (err) |
| 184 | goto auth_unlock; | 180 | goto auth_unlock; |
