crypto: caam - dereferencing ERR_PTR on allocation failure
authorDan Carpenter <error27@gmail.com>
Wed, 23 Mar 2011 13:20:27 +0000 (21:20 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sun, 27 Mar 2011 02:45:17 +0000 (10:45 +0800)
t_alg is an ERR_PTR here so we can't dereference it.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/caam/caamalg.c

index 1403434960962d963b6ac94b2e72eee33fa22e1e..dce44b2d1833421ba6c354e2a2dad731e9794944 100644 (file)
@@ -1136,7 +1136,7 @@ static int __init caam_algapi_init(void)
                if (IS_ERR(t_alg)) {
                        err = PTR_ERR(t_alg);
                        dev_warn(ctrldev, "%s alg allocation failed\n",
-                                t_alg->crypto_alg.cra_driver_name);
+                                driver_algs[i].driver_name);
                        continue;
                }