aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/crypto/nx/nx-aes-gcm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/crypto/nx/nx-aes-gcm.c b/drivers/crypto/nx/nx-aes-gcm.c
index df90d03afc10..74feee10f943 100644
--- a/drivers/crypto/nx/nx-aes-gcm.c
+++ b/drivers/crypto/nx/nx-aes-gcm.c
@@ -246,11 +246,11 @@ static int gcm_aes_nx_crypt(struct aead_request *req, int enc)
246 req->dst, nbytes, 246 req->dst, nbytes,
247 crypto_aead_authsize(crypto_aead_reqtfm(req)), 247 crypto_aead_authsize(crypto_aead_reqtfm(req)),
248 SCATTERWALK_TO_SG); 248 SCATTERWALK_TO_SG);
249 } else if (req->assoclen) { 249 } else {
250 u8 *itag = nx_ctx->priv.gcm.iauth_tag; 250 u8 *itag = nx_ctx->priv.gcm.iauth_tag;
251 u8 *otag = csbcpb->cpb.aes_gcm.out_pat_or_mac; 251 u8 *otag = csbcpb->cpb.aes_gcm.out_pat_or_mac;
252 252
253 scatterwalk_map_and_copy(itag, req->dst, nbytes, 253 scatterwalk_map_and_copy(itag, req->src, nbytes,
254 crypto_aead_authsize(crypto_aead_reqtfm(req)), 254 crypto_aead_authsize(crypto_aead_reqtfm(req)),
255 SCATTERWALK_FROM_SG); 255 SCATTERWALK_FROM_SG);
256 rc = memcmp(itag, otag, 256 rc = memcmp(itag, otag,