Commit cdc712d8 authored by Dan Carpenter's avatar Dan Carpenter Committed by Herbert Xu

crypto: caam - dereferencing ERR_PTR on allocation failure

t_alg is an ERR_PTR here so we can't dereference it.
Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Acked-by: default avatarKim Phillips <kim.phillips@freescale.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 54e198d4
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment