aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/pcrypt.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/pcrypt.c')
-rw-r--r--crypto/pcrypt.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/crypto/pcrypt.c b/crypto/pcrypt.c
index 71ae2b2ae33b..6036b6de9079 100644
--- a/crypto/pcrypt.c
+++ b/crypto/pcrypt.c
@@ -143,10 +143,8 @@ static int pcrypt_aead_encrypt(struct aead_request *req)
143 aead_request_set_assoc(creq, req->assoc, req->assoclen); 143 aead_request_set_assoc(creq, req->assoc, req->assoclen);
144 144
145 err = pcrypt_do_parallel(padata, &ctx->cb_cpu, pcrypt_enc_padata); 145 err = pcrypt_do_parallel(padata, &ctx->cb_cpu, pcrypt_enc_padata);
146 if (err) 146 if (!err)
147 return err; 147 return -EINPROGRESS;
148 else
149 err = crypto_aead_encrypt(creq);
150 148
151 return err; 149 return err;
152} 150}
@@ -187,10 +185,8 @@ static int pcrypt_aead_decrypt(struct aead_request *req)
187 aead_request_set_assoc(creq, req->assoc, req->assoclen); 185 aead_request_set_assoc(creq, req->assoc, req->assoclen);
188 186
189 err = pcrypt_do_parallel(padata, &ctx->cb_cpu, pcrypt_dec_padata); 187 err = pcrypt_do_parallel(padata, &ctx->cb_cpu, pcrypt_dec_padata);
190 if (err) 188 if (!err)
191 return err; 189 return -EINPROGRESS;
192 else
193 err = crypto_aead_decrypt(creq);
194 190
195 return err; 191 return err;
196} 192}
@@ -233,10 +229,8 @@ static int pcrypt_aead_givencrypt(struct aead_givcrypt_request *req)
233 aead_givcrypt_set_giv(creq, req->giv, req->seq); 229 aead_givcrypt_set_giv(creq, req->giv, req->seq);
234 230
235 err = pcrypt_do_parallel(padata, &ctx->cb_cpu, pcrypt_enc_padata); 231 err = pcrypt_do_parallel(padata, &ctx->cb_cpu, pcrypt_enc_padata);
236 if (err) 232 if (!err)
237 return err; 233 return -EINPROGRESS;
238 else
239 err = crypto_aead_givencrypt(creq);
240 234
241 return err; 235 return err;
242} 236}