All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] crypto: talitos - fix warning: 'alg' may be used uninitialized in this function
@ 2010-09-13 22:45 Kim Phillips
  2010-09-23  7:57 ` Herbert Xu
  0 siblings, 1 reply; 2+ messages in thread
From: Kim Phillips @ 2010-09-13 22:45 UTC (permalink / raw)
  To: linux-crypto

drivers/crypto/talitos.c: In function 'talitos_probe':
drivers/crypto/talitos.c:2363: warning: 'alg' may be used uninitialized in this function
drivers/crypto/talitos.c:2363: note: 'alg' was declared here

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
---
 drivers/crypto/talitos.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c
index 4bcd825..d4c1fc2 100644
--- a/drivers/crypto/talitos.c
+++ b/drivers/crypto/talitos.c
@@ -2389,6 +2389,9 @@ static struct talitos_crypto_alg *talitos_alg_alloc(struct device *dev,
 					DESC_HDR_MODE0_MDEU_SHA256;
 		}
 		break;
+	default:
+		dev_err(dev, "unknown algorithm type %d\n", t_alg->algt.type);
+		return ERR_PTR(-EINVAL);
 	}
 
 	alg->cra_module = THIS_MODULE;
-- 
1.7.1

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

* Re: [PATCH 1/3] crypto: talitos - fix warning: 'alg' may be used uninitialized in this function
  2010-09-13 22:45 [PATCH 1/3] crypto: talitos - fix warning: 'alg' may be used uninitialized in this function Kim Phillips
@ 2010-09-23  7:57 ` Herbert Xu
  0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2010-09-23  7:57 UTC (permalink / raw)
  To: Kim Phillips; +Cc: linux-crypto

On Mon, Sep 13, 2010 at 10:45:33PM +0000, Kim Phillips wrote:
> drivers/crypto/talitos.c: In function 'talitos_probe':
> drivers/crypto/talitos.c:2363: warning: 'alg' may be used uninitialized in this function
> drivers/crypto/talitos.c:2363: note: 'alg' was declared here
> 
> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>

All three patches applied.  Thanks Kim!
-- 
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] 2+ messages in thread

end of thread, other threads:[~2010-09-23  7:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-13 22:45 [PATCH 1/3] crypto: talitos - fix warning: 'alg' may be used uninitialized in this function Kim Phillips
2010-09-23  7:57 ` Herbert Xu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.