Skip to contentSkip to conversation

crypto: talitos - fix warning: 'alg' may be used uninitialized in this function

PATCH In review Kim Phillips 2 participants 2 messages Sep 13, 2010 – Sep 23, 2010 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 crypto: talitos - fix warning: 'alg' may be used uninitialized in this function

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

---
 drivers/crypto/talitos.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/crypto/talitos.c +3 -0
index 4bcd825..d4c1fc2 100644
@@ -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;
Signature · 1 line
1.7.1
maintainer
#1 lore raw
Quoted 5 lines · Kim Phillips

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

All three patches applied. Thanks Kim!

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