crypto: talitos - fix warning: 'alg' may be used uninitialized in this function
authorKim Phillips <kim.phillips@freescale.com>
Thu, 23 Sep 2010 07:55:27 +0000 (15:55 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 23 Sep 2010 07:55:27 +0000 (15:55 +0800)
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>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/talitos.c

index 97f4af1d8a64415ff32de856381781997223284d..bbf39991c0d053528389fefe463c6bf8813d4b1b 100644 (file)
@@ -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;