summaryrefslogtreecommitdiff
path: root/crypto/authenc.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-09-04 09:04:45 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-09-04 09:04:45 -0700
commitb7a047f3bc596ac41a53b27b38eb7a7a5eb2d2b3 (patch)
tree5bc6c99bf53d43a7d2148e38c81ee00dc8fce6b4 /crypto/authenc.c
parenteb7e27d6e498a98be39897ff84f254bcabae4a74 (diff)
parent22e6191ca891ad8f54e18f74a0ec19c617f7b433 (diff)
downloadlinux-crypto-b7a047f3bc596ac41a53b27b38eb7a7a5eb2d2b3.tar.gz
linux-crypto-b7a047f3bc596ac41a53b27b38eb7a7a5eb2d2b3.zip
Merge branch 'x86/cpu' into x86/xsave
Conflicts: arch/x86/kernel/cpu/feature_names.c include/asm-x86/cpufeature.h
Diffstat (limited to 'crypto/authenc.c')
-rw-r--r--crypto/authenc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/crypto/authenc.c b/crypto/authenc.c
index 4b226768..fd9f06c6 100644
--- a/crypto/authenc.c
+++ b/crypto/authenc.c
@@ -174,8 +174,9 @@ static int crypto_authenc_genicv(struct aead_request *req, u8 *iv,
static void crypto_authenc_encrypt_done(struct crypto_async_request *req,
int err)
{
+ struct aead_request *areq = req->data;
+
if (!err) {
- struct aead_request *areq = req->data;
struct crypto_aead *authenc = crypto_aead_reqtfm(areq);
struct crypto_authenc_ctx *ctx = crypto_aead_ctx(authenc);
struct ablkcipher_request *abreq = aead_request_ctx(areq);
@@ -185,7 +186,7 @@ static void crypto_authenc_encrypt_done(struct crypto_async_request *req,
err = crypto_authenc_genicv(areq, iv, 0);
}
- aead_request_complete(req->data, err);
+ aead_request_complete(areq, err);
}
static int crypto_authenc_encrypt(struct aead_request *req)
@@ -216,14 +217,15 @@ static int crypto_authenc_encrypt(struct aead_request *req)
static void crypto_authenc_givencrypt_done(struct crypto_async_request *req,
int err)
{
+ struct aead_request *areq = req->data;
+
if (!err) {
- struct aead_request *areq = req->data;
struct skcipher_givcrypt_request *greq = aead_request_ctx(areq);
err = crypto_authenc_genicv(areq, greq->giv, 0);
}
- aead_request_complete(req->data, err);
+ aead_request_complete(areq, err);
}
static int crypto_authenc_givencrypt(struct aead_givcrypt_request *req)