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

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

On Tue, 15 Mar 2011 09:57:47 +0300
Dan Carpenter <error27@gmail.com> wrote:

> 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>

Thanks,

Kim


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

* Re: [patch] crypto: caam - dereferencing ERR_PTR on allocation
  2011-03-15 22:20 ` [patch] crypto: caam - dereferencing ERR_PTR on allocation Kim Phillips
@ 2011-03-23 13:20   ` Herbert Xu
  0 siblings, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2011-03-23 13:20 UTC (permalink / raw)
  To: Kim Phillips
  Cc: Dan Carpenter, David S. Miller, Steve Cornelius, linux-crypto,
	kernel-janitors

On Tue, Mar 15, 2011 at 05:20:34PM -0500, Kim Phillips wrote:
> On Tue, 15 Mar 2011 09:57:47 +0300
> Dan Carpenter <error27@gmail.com> wrote:
> 
> > 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>

Applied.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[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