crypto: caam - dereferencing ERR_PTR on allocation failure

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>
This commit is contained in:
Dan Carpenter 2011-03-23 21:20:27 +08:00 committed by Herbert Xu
parent 54e198d4c1
commit cdc712d884

View 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;
}