From: Kim Phillips Date: Thu, 23 Sep 2010 07:55:27 +0000 (+0800) Subject: crypto: talitos - fix warning: 'alg' may be used uninitialized in this function X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1d11911a8c572041880c8d86229f6ed971f6f7e2;p=linux-beck.git 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 Signed-off-by: Kim Phillips Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index 97f4af1d8a64..bbf39991c0d0 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;