summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-05-20 08:16:05 +0200
committerDavid S. Miller <davem@davemloft.net>2010-05-26 02:37:16 +0200
commit38511108a37e5551b2bfe143a957132d46f9e6e7 (patch)
tree886c43b6f79b9604c2bcc2dff03b56a6ead9f69e
parentn2_crypto: Kill n2_base_ctx and helpers. (diff)
downloadlinux-38511108a37e5551b2bfe143a957132d46f9e6e7.tar.xz
linux-38511108a37e5551b2bfe143a957132d46f9e6e7.zip
n2_crypto: Log algorithm success/failure in kernel log.
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/crypto/n2_core.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/crypto/n2_core.c b/drivers/crypto/n2_core.c
index 3a4eed4bba2a..77939e40e26f 100644
--- a/drivers/crypto/n2_core.c
+++ b/drivers/crypto/n2_core.c
@@ -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;
}