crypto: caam - fix error reporting for caam_hash_alloc
authorIuliana Prodan <Iuliana.Prodan@nxp.com>
Fri, 21 Dec 2018 15:59:08 +0000 (17:59 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 11 Jan 2019 06:16:56 +0000 (14:16 +0800)
Fix error reporting when preparation of an hmac algorithm
for registration fails: print the hmac algorithm name, not the unkeyed
hash algorithm name.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/caam/caamhash.c

index bb1a2cdf195127070579d4988b662926af976549..17e86e4a6428baa4c119cf8d9dc69c3305e0253e 100644 (file)
@@ -1873,7 +1873,8 @@ static int __init caam_algapi_hash_init(void)
                t_alg = caam_hash_alloc(alg, true);
                if (IS_ERR(t_alg)) {
                        err = PTR_ERR(t_alg);
-                       pr_warn("%s alg allocation failed\n", alg->driver_name);
+                       pr_warn("%s alg allocation failed\n",
+                               alg->hmac_driver_name);
                        continue;
                }