Skip to contentSkip to conversation

n2_crypto: Log algorithm success/failure in kernel log.

PATCH In review David Miller 1 participant 1 message May 26, 2010 Crypto API

lore
Share & tools
lore

David Miller

author maintainer
#0 lore raw

PATCH 5/7 n2_crypto: Log algorithm success/failure in kernel log.

---
 drivers/crypto/n2_core.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
drivers/crypto/n2_core.c +6 -0
index 3a4eed4..77939e4 100644
@@ -1277,8 +1277,11 @@ static int __devinit __n2_register_one_cipher(const struct n2_cipher_tmpl *tmpl)
 	list_add(&p->entry, &cipher_algs);
 	err = crypto_register_alg(alg);
 	if (err) {
+		pr_err("%s alg registration failed\n", alg->cra_name);
 		list_del(&p->entry);
 		kfree(p);
+	} else {
+		pr_info("%s alg registered\n", alg->cra_name);
 	}
 	return err;
 }
@@ -1318,8 +1321,11 @@ static int __devinit __n2_register_one_ahash(const struct n2_hash_tmpl *tmpl)
 	list_add(&p->entry, &ahash_algs);
 	err = crypto_register_ahash(ahash);
 	if (err) {
+		pr_err("%s alg registration failed\n", base->cra_name);
 		list_del(&p->entry);
 		kfree(p);
+	} else {
+		pr_info("%s alg registered\n", base->cra_name);
 	}
 	return err;
 }
Signature · 1 line
1.7.0.4