Re: [PATCH] crypto: crypto4xx - fix an error code

2017-06-19 Thread Herbert Xu
On Sat, Jun 10, 2017 at 02:54:33PM +0200, Christophe JAILLET wrote:
> If 'kzalloc' fails, we return 0 which means success.
> return -ENOMEM instead as already done a few lines above.
> 
> Signed-off-by: Christophe JAILLET 

Patch applied.  Thanks.
-- 
Email: Herbert Xu 
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt


[PATCH] crypto: crypto4xx - fix an error code

2017-06-10 Thread Christophe JAILLET
If 'kzalloc' fails, we return 0 which means success.
return -ENOMEM instead as already done a few lines above.

Signed-off-by: Christophe JAILLET 
---
 drivers/crypto/amcc/crypto4xx_core.c | 1 +
 1 file changed, 1 insertion(+)

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;
 
-- 
2.11.0