n2_crypto: Log algorithm success/failure in kernel log.
authorDavid S. Miller <davem@davemloft.net>
Thu, 20 May 2010 06:16:05 +0000 (23:16 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 May 2010 00:37:16 +0000 (17:37 -0700)
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/crypto/n2_core.c

index 3a4eed4bba2a2bbbbb170af4c8ccd48e916b6655..77939e40e26fcda29e952d5b3377b0fa7f083bc5 100644 (file)
@@ -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;
 }