Skip to content

Commit

Permalink
crypto: caam - dereferencing ERR_PTR on allocation failure
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Herbert Xu committed Mar 27, 2011
1 parent 54e198d commit cdc712d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/crypto/caam/caamalg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit cdc712d

Please sign in to comment.