Skip to contentSkip to conversation

crypto: caam - dereferencing ERR_PTR on allocation failure

PATCH Applied Dan Carpenter 3 participants 3 messages Mar 15, 2011 – Mar 23, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: caam - dereferencing ERR_PTR on allocation failure

t_alg is an ERR_PTR here so we can't dereference it.

---
This doesn't compile for me. Sorry.

drivers/crypto/caam/caamalg.c +1 -1
index d7fe3d3..a27b6d3 100644
@@ -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;
 		}
 
Applied
#2 lore raw

Re: [patch] crypto: caam - dereferencing ERR_PTR on allocation

Quoted 9 lines · Kim Phillips
Quoted 4 lines · On Tue, 15 Mar 2011 09:57:47 +0300 Dan Carpenter <[email protected]> wrote:

t_alg is an ERR_PTR here so we can't dereference it.

---

Applied.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt