Lines Matching refs:err

135 	int err;  in cryptd_enqueue_request()  local
142 err = crypto_enqueue_request(&cpu_queue->queue, request); in cryptd_enqueue_request()
146 if (err == -ENOSPC) in cryptd_enqueue_request()
160 return err; in cryptd_enqueue_request()
247 struct skcipher_request *req, int err) in cryptd_skcipher_prepare() argument
257 if (unlikely(err == -EINPROGRESS)) in cryptd_skcipher_prepare()
272 static void cryptd_skcipher_complete(struct skcipher_request *req, int err, in cryptd_skcipher_complete() argument
282 skcipher_request_complete(req, err); in cryptd_skcipher_complete()
285 if (unlikely(err == -EINPROGRESS)) { in cryptd_skcipher_complete()
294 static void cryptd_skcipher_encrypt(void *data, int err) in cryptd_skcipher_encrypt() argument
299 subreq = cryptd_skcipher_prepare(req, err); in cryptd_skcipher_encrypt()
301 err = crypto_skcipher_encrypt(subreq); in cryptd_skcipher_encrypt()
303 cryptd_skcipher_complete(req, err, cryptd_skcipher_encrypt); in cryptd_skcipher_encrypt()
306 static void cryptd_skcipher_decrypt(void *data, int err) in cryptd_skcipher_decrypt() argument
311 subreq = cryptd_skcipher_prepare(req, err); in cryptd_skcipher_decrypt()
313 err = crypto_skcipher_decrypt(subreq); in cryptd_skcipher_decrypt()
315 cryptd_skcipher_complete(req, err, cryptd_skcipher_decrypt); in cryptd_skcipher_decrypt()
389 int err; in cryptd_create_skcipher() local
400 err = crypto_grab_skcipher(&ctx->spawn, skcipher_crypto_instance(inst), in cryptd_create_skcipher()
402 if (err) in cryptd_create_skcipher()
406 err = cryptd_init_instance(skcipher_crypto_instance(inst), &alg->base); in cryptd_create_skcipher()
407 if (err) in cryptd_create_skcipher()
428 err = skcipher_register_instance(tmpl, inst); in cryptd_create_skcipher()
429 if (err) { in cryptd_create_skcipher()
433 return err; in cryptd_create_skcipher()
506 int err) in cryptd_hash_prepare() argument
513 if (unlikely(err == -EINPROGRESS)) in cryptd_hash_prepare()
519 static void cryptd_hash_complete(struct ahash_request *req, int err, in cryptd_hash_complete() argument
527 ahash_request_complete(req, err); in cryptd_hash_complete()
530 if (err == -EINPROGRESS) { in cryptd_hash_complete()
537 static void cryptd_hash_init(void *data, int err) in cryptd_hash_init() argument
545 desc = cryptd_hash_prepare(req, err); in cryptd_hash_init()
551 err = crypto_shash_init(desc); in cryptd_hash_init()
554 cryptd_hash_complete(req, err, cryptd_hash_init); in cryptd_hash_init()
562 static void cryptd_hash_update(void *data, int err) in cryptd_hash_update() argument
567 desc = cryptd_hash_prepare(req, err); in cryptd_hash_update()
569 err = shash_ahash_update(req, desc); in cryptd_hash_update()
571 cryptd_hash_complete(req, err, cryptd_hash_update); in cryptd_hash_update()
579 static void cryptd_hash_final(void *data, int err) in cryptd_hash_final() argument
584 desc = cryptd_hash_prepare(req, err); in cryptd_hash_final()
586 err = crypto_shash_final(desc, req->result); in cryptd_hash_final()
588 cryptd_hash_complete(req, err, cryptd_hash_final); in cryptd_hash_final()
596 static void cryptd_hash_finup(void *data, int err) in cryptd_hash_finup() argument
601 desc = cryptd_hash_prepare(req, err); in cryptd_hash_finup()
603 err = shash_ahash_finup(req, desc); in cryptd_hash_finup()
605 cryptd_hash_complete(req, err, cryptd_hash_finup); in cryptd_hash_finup()
613 static void cryptd_hash_digest(void *data, int err) in cryptd_hash_digest() argument
621 desc = cryptd_hash_prepare(req, err); in cryptd_hash_digest()
627 err = shash_ahash_digest(req, desc); in cryptd_hash_digest()
630 cryptd_hash_complete(req, err, cryptd_hash_digest); in cryptd_hash_digest()
673 int err; in cryptd_create_hash() local
684 err = crypto_grab_shash(&ctx->spawn, ahash_crypto_instance(inst), in cryptd_create_hash()
686 if (err) in cryptd_create_hash()
690 err = cryptd_init_instance(ahash_crypto_instance(inst), &alg->base); in cryptd_create_hash()
691 if (err) in cryptd_create_hash()
717 err = ahash_register_instance(tmpl, inst); in cryptd_create_hash()
718 if (err) { in cryptd_create_hash()
722 return err; in cryptd_create_hash()
744 struct crypto_aead *child, int err, in cryptd_aead_crypt() argument
761 if (unlikely(err == -EINPROGRESS)) in cryptd_aead_crypt()
771 err = crypt(subreq); in cryptd_aead_crypt()
778 aead_request_complete(req, err); in cryptd_aead_crypt()
781 if (err == -EINPROGRESS) { in cryptd_aead_crypt()
790 static void cryptd_aead_encrypt(void *data, int err) in cryptd_aead_encrypt() argument
798 cryptd_aead_crypt(req, child, err, crypto_aead_alg(child)->encrypt, in cryptd_aead_encrypt()
802 static void cryptd_aead_decrypt(void *data, int err) in cryptd_aead_decrypt() argument
810 cryptd_aead_crypt(req, child, err, crypto_aead_alg(child)->decrypt, in cryptd_aead_decrypt()
882 int err; in cryptd_create_aead() local
893 err = crypto_grab_aead(&ctx->aead_spawn, aead_crypto_instance(inst), in cryptd_create_aead()
895 if (err) in cryptd_create_aead()
899 err = cryptd_init_instance(aead_crypto_instance(inst), &alg->base); in cryptd_create_aead()
900 if (err) in cryptd_create_aead()
919 err = aead_register_instance(tmpl, inst); in cryptd_create_aead()
920 if (err) { in cryptd_create_aead()
924 return err; in cryptd_create_aead()
1116 int err; in cryptd_init() local
1123 err = cryptd_init_queue(&queue, cryptd_max_cpu_qlen); in cryptd_init()
1124 if (err) in cryptd_init()
1127 err = crypto_register_template(&cryptd_tmpl); in cryptd_init()
1128 if (err) in cryptd_init()
1137 return err; in cryptd_init()