int __init crypto_ccm_module_init(void) { int err; err = crypto_register_template(&crypto_ccm_base_tmpl); if (err) goto out; err = crypto_register_template(&crypto_ccm_tmpl); if (err) goto out_undo_base; err = crypto_register_template(&crypto_rfc4309_tmpl); if (err) goto out_undo_ccm; out: return err; out_undo_ccm: crypto_unregister_template(&crypto_ccm_tmpl); out_undo_base: crypto_unregister_template(&crypto_ccm_base_tmpl); goto out; }
static void __exit crypto_gcm_module_exit(void) { kfree(gcm_zeroes); crypto_unregister_template(&crypto_rfc4106_tmpl); crypto_unregister_template(&crypto_gcm_tmpl); crypto_unregister_template(&crypto_gcm_base_tmpl); }
static int __init crypto_gcm_module_init(void) { int err; gcm_zeroes = kzalloc(16, GFP_KERNEL); if (!gcm_zeroes) return -ENOMEM; err = crypto_register_template(&crypto_gcm_base_tmpl); if (err) goto out; err = crypto_register_template(&crypto_gcm_tmpl); if (err) goto out_undo_base; err = crypto_register_template(&crypto_rfc4106_tmpl); if (err) goto out_undo_gcm; return 0; out_undo_gcm: crypto_unregister_template(&crypto_gcm_tmpl); out_undo_base: crypto_unregister_template(&crypto_gcm_base_tmpl); out: kfree(gcm_zeroes); return err; }
static void __exit pcrypt_exit(void) { pcrypt_fini_padata(&pencrypt); pcrypt_fini_padata(&pdecrypt); kset_unregister(pcrypt_kset); crypto_unregister_template(&pcrypt_tmpl); }
static int __init crypto_ctr_module_init(void) { int err; err = crypto_register_template(&crypto_ctr_tmpl); if (err) goto out; err = crypto_register_template(&crypto_rfc3686_tmpl); if (err) goto out_drop_ctr; out: return err; out_drop_ctr: crypto_unregister_template(&crypto_ctr_tmpl); goto out; }
static void __exit crypto_ofb_module_exit(void) { crypto_unregister_template(&crypto_ofb_tmpl); }
void __exit crypto_ccm_module_exit(void) { crypto_unregister_template(&crypto_rfc4309_tmpl); crypto_unregister_template(&crypto_ccm_tmpl); crypto_unregister_template(&crypto_ccm_base_tmpl); }
static void __exit crypto_ctr_module_exit(void) { crypto_unregister_template(&crypto_rfc3686_tmpl); crypto_unregister_template(&crypto_ctr_tmpl); }
static void __exit echainiv_module_exit(void) { crypto_unregister_template(&echainiv_tmpl); }
static void __exit cryptd_exit(void) { cryptd_stop_thread(&state); crypto_unregister_template(&cryptd_tmpl); }
static void __exit seqiv_module_exit(void) { crypto_unregister_template(&seqiv_tmpl); }
void __exit eseqiv_module_exit(void) { crypto_unregister_template(&eseqiv_tmpl); }
void __exit crypto_fpu_exit(void) { crypto_unregister_template(&crypto_fpu_tmpl); }
void chainiv_module_exit(void) { crypto_unregister_template(&chainiv_tmpl); }