• Home
  • Raw
  • Download

Lines Matching refs:err

133 	int err;  in cryptd_enqueue_request()  local
139 err = crypto_enqueue_request(&cpu_queue->queue, request); in cryptd_enqueue_request()
143 if (err == -ENOSPC) in cryptd_enqueue_request()
156 return err; in cryptd_enqueue_request()
240 static void cryptd_skcipher_complete(struct skcipher_request *req, int err) in cryptd_skcipher_complete() argument
248 rctx->complete(&req->base, err); in cryptd_skcipher_complete()
251 if (err != -EINPROGRESS && refcnt && refcount_dec_and_test(&ctx->refcnt)) in cryptd_skcipher_complete()
256 int err) in cryptd_skcipher_encrypt() argument
265 if (unlikely(err == -EINPROGRESS)) in cryptd_skcipher_encrypt()
274 err = crypto_skcipher_encrypt(subreq); in cryptd_skcipher_encrypt()
280 cryptd_skcipher_complete(req, err); in cryptd_skcipher_encrypt()
284 int err) in cryptd_skcipher_decrypt() argument
293 if (unlikely(err == -EINPROGRESS)) in cryptd_skcipher_decrypt()
302 err = crypto_skcipher_decrypt(subreq); in cryptd_skcipher_decrypt()
308 cryptd_skcipher_complete(req, err); in cryptd_skcipher_decrypt()
379 int err; in cryptd_create_skcipher() local
390 err = crypto_grab_skcipher(&ctx->spawn, skcipher_crypto_instance(inst), in cryptd_create_skcipher()
392 if (err) in cryptd_create_skcipher()
396 err = cryptd_init_instance(skcipher_crypto_instance(inst), &alg->base); in cryptd_create_skcipher()
397 if (err) in cryptd_create_skcipher()
418 err = skcipher_register_instance(tmpl, inst); in cryptd_create_skcipher()
419 if (err) { in cryptd_create_skcipher()
423 return err; in cryptd_create_skcipher()
478 static void cryptd_hash_complete(struct ahash_request *req, int err) in cryptd_hash_complete() argument
486 rctx->complete(&req->base, err); in cryptd_hash_complete()
489 if (err != -EINPROGRESS && refcnt && refcount_dec_and_test(&ctx->refcnt)) in cryptd_hash_complete()
493 static void cryptd_hash_init(struct crypto_async_request *req_async, int err) in cryptd_hash_init() argument
501 if (unlikely(err == -EINPROGRESS)) in cryptd_hash_init()
506 err = crypto_shash_init(desc); in cryptd_hash_init()
511 cryptd_hash_complete(req, err); in cryptd_hash_init()
519 static void cryptd_hash_update(struct crypto_async_request *req_async, int err) in cryptd_hash_update() argument
526 if (unlikely(err == -EINPROGRESS)) in cryptd_hash_update()
529 err = shash_ahash_update(req, &rctx->desc); in cryptd_hash_update()
534 cryptd_hash_complete(req, err); in cryptd_hash_update()
542 static void cryptd_hash_final(struct crypto_async_request *req_async, int err) in cryptd_hash_final() argument
547 if (unlikely(err == -EINPROGRESS)) in cryptd_hash_final()
550 err = crypto_shash_final(&rctx->desc, req->result); in cryptd_hash_final()
555 cryptd_hash_complete(req, err); in cryptd_hash_final()
563 static void cryptd_hash_finup(struct crypto_async_request *req_async, int err) in cryptd_hash_finup() argument
568 if (unlikely(err == -EINPROGRESS)) in cryptd_hash_finup()
571 err = shash_ahash_finup(req, &rctx->desc); in cryptd_hash_finup()
576 cryptd_hash_complete(req, err); in cryptd_hash_finup()
584 static void cryptd_hash_digest(struct crypto_async_request *req_async, int err) in cryptd_hash_digest() argument
592 if (unlikely(err == -EINPROGRESS)) in cryptd_hash_digest()
597 err = shash_ahash_digest(req, desc); in cryptd_hash_digest()
602 cryptd_hash_complete(req, err); in cryptd_hash_digest()
645 int err; in cryptd_create_hash() local
656 err = crypto_grab_shash(&ctx->spawn, ahash_crypto_instance(inst), in cryptd_create_hash()
658 if (err) in cryptd_create_hash()
662 err = cryptd_init_instance(ahash_crypto_instance(inst), &alg->base); in cryptd_create_hash()
663 if (err) in cryptd_create_hash()
688 err = ahash_register_instance(tmpl, inst); in cryptd_create_hash()
689 if (err) { in cryptd_create_hash()
693 return err; in cryptd_create_hash()
716 int err, in cryptd_aead_crypt() argument
730 if (unlikely(err == -EINPROGRESS)) in cryptd_aead_crypt()
733 err = crypt( req ); in cryptd_aead_crypt()
740 compl(&req->base, err); in cryptd_aead_crypt()
743 if (err != -EINPROGRESS && refcnt && refcount_dec_and_test(&ctx->refcnt)) in cryptd_aead_crypt()
747 static void cryptd_aead_encrypt(struct crypto_async_request *areq, int err) in cryptd_aead_encrypt() argument
754 cryptd_aead_crypt(req, child, err, crypto_aead_alg(child)->encrypt); in cryptd_aead_encrypt()
757 static void cryptd_aead_decrypt(struct crypto_async_request *areq, int err) in cryptd_aead_decrypt() argument
764 cryptd_aead_crypt(req, child, err, crypto_aead_alg(child)->decrypt); in cryptd_aead_decrypt()
832 int err; in cryptd_create_aead() local
843 err = crypto_grab_aead(&ctx->aead_spawn, aead_crypto_instance(inst), in cryptd_create_aead()
845 if (err) in cryptd_create_aead()
849 err = cryptd_init_instance(aead_crypto_instance(inst), &alg->base); in cryptd_create_aead()
850 if (err) in cryptd_create_aead()
869 err = aead_register_instance(tmpl, inst); in cryptd_create_aead()
870 if (err) { in cryptd_create_aead()
874 return err; in cryptd_create_aead()
1066 int err; in cryptd_init() local
1073 err = cryptd_init_queue(&queue, cryptd_max_cpu_qlen); in cryptd_init()
1074 if (err) in cryptd_init()
1077 err = crypto_register_template(&cryptd_tmpl); in cryptd_init()
1078 if (err) in cryptd_init()
1087 return err; in cryptd_init()