Lines Matching refs:salg
115 struct simd_skcipher_alg *salg; in simd_skcipher_init() local
120 salg = container_of(alg, struct simd_skcipher_alg, alg); in simd_skcipher_init()
122 cryptd_tfm = cryptd_alloc_skcipher(salg->ialg_name, in simd_skcipher_init()
143 struct simd_skcipher_alg *salg; in simd_skcipher_create_compat() local
156 salg = kzalloc(sizeof(*salg), GFP_KERNEL); in simd_skcipher_create_compat()
157 if (!salg) { in simd_skcipher_create_compat()
158 salg = ERR_PTR(-ENOMEM); in simd_skcipher_create_compat()
162 salg->ialg_name = basename; in simd_skcipher_create_compat()
163 alg = &salg->alg; in simd_skcipher_create_compat()
200 return salg; in simd_skcipher_create_compat()
203 kfree(salg); in simd_skcipher_create_compat()
204 salg = ERR_PTR(err); in simd_skcipher_create_compat()
222 void simd_skcipher_free(struct simd_skcipher_alg *salg) in simd_skcipher_free() argument
224 crypto_unregister_skcipher(&salg->alg); in simd_skcipher_free()
225 kfree(salg); in simd_skcipher_free()
363 struct simd_aead_alg *salg; in simd_aead_init() local
368 salg = container_of(alg, struct simd_aead_alg, alg); in simd_aead_init()
370 cryptd_tfm = cryptd_alloc_aead(salg->ialg_name, CRYPTO_ALG_INTERNAL, in simd_aead_init()
390 struct simd_aead_alg *salg; in simd_aead_create_compat() local
403 salg = kzalloc(sizeof(*salg), GFP_KERNEL); in simd_aead_create_compat()
404 if (!salg) { in simd_aead_create_compat()
405 salg = ERR_PTR(-ENOMEM); in simd_aead_create_compat()
409 salg->ialg_name = basename; in simd_aead_create_compat()
410 alg = &salg->alg; in simd_aead_create_compat()
447 return salg; in simd_aead_create_compat()
450 kfree(salg); in simd_aead_create_compat()
451 salg = ERR_PTR(err); in simd_aead_create_compat()
469 void simd_aead_free(struct simd_aead_alg *salg) in simd_aead_free() argument
471 crypto_unregister_aead(&salg->alg); in simd_aead_free()
472 kfree(salg); in simd_aead_free()