public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] crypto: caam - dereferencing ERR_PTR on allocation failure
@ 2011-03-15  6:57 Dan Carpenter
  2011-03-15 22:20 ` [patch] crypto: caam - dereferencing ERR_PTR on allocation Kim Phillips
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2011-03-15  6:57 UTC (permalink / raw)
  To: Herbert Xu
  Cc: David S. Miller, Steve Cornelius, Kim Phillips, linux-crypto,
	kernel-janitors

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

Signed-off-by: Dan Carpenter <error27@gmail.com>
---
This doesn't compile for me.  Sorry.

diff --git a/drivers/crypto/caam/caamalg.c b/drivers/crypto/caam/caamalg.c
index d7fe3d3..a27b6d3 100644
--- a/drivers/crypto/caam/caamalg.c
+++ b/drivers/crypto/caam/caamalg.c
@@ -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;
 		}
 

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-03-23 13:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-15  6:57 [patch] crypto: caam - dereferencing ERR_PTR on allocation failure Dan Carpenter
2011-03-15 22:20 ` [patch] crypto: caam - dereferencing ERR_PTR on allocation Kim Phillips
2011-03-23 13:20   ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox