diff options
author | Christophe Jaillet <christophe.jaillet@wanadoo.fr> | 2017-06-10 14:54:33 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2017-06-20 11:21:14 +0800 |
commit | ffe55266e36bef40b940b38bfef4fcff4957624d (patch) | |
tree | d594798cb863b74edf1829a4f5fd2e1a1b93e646 /drivers/crypto/amcc/crypto4xx_core.c | |
parent | 88d58ef891d868303acd7951cb1282c911f736ac (diff) | |
download | linux-stable-ffe55266e36bef40b940b38bfef4fcff4957624d.tar.gz linux-stable-ffe55266e36bef40b940b38bfef4fcff4957624d.tar.bz2 linux-stable-ffe55266e36bef40b940b38bfef4fcff4957624d.zip |
crypto: crypto4xx - fix an error code
If 'kzalloc' fails, we return 0 which means success.
return -ENOMEM instead as already done a few lines above.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/amcc/crypto4xx_core.c')
-rw-r--r-- | drivers/crypto/amcc/crypto4xx_core.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/crypto/amcc/crypto4xx_core.c b/drivers/crypto/amcc/crypto4xx_core.c index fdc83a2281ca..65dc78b91dea 100644 --- a/drivers/crypto/amcc/crypto4xx_core.c +++ b/drivers/crypto/amcc/crypto4xx_core.c @@ -1179,6 +1179,7 @@ static int crypto4xx_probe(struct platform_device *ofdev) dev_set_drvdata(dev, core_dev); core_dev->ofdev = ofdev; core_dev->dev = kzalloc(sizeof(struct crypto4xx_device), GFP_KERNEL); + rc = -ENOMEM; if (!core_dev->dev) goto err_alloc_dev; |