Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1662950 > unrolled thread
| Started by | Christophe JAILLET <christophe.jaillet@wanadoo.fr> |
|---|---|
| First post | 2017-06-10 15:00 +0200 |
| Last post | 2017-06-20 05:40 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] crypto: crypto4xx - fix an error code Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2017-06-10 15:00 +0200
Re: [PATCH] crypto: crypto4xx - fix an error code Herbert Xu <herbert@gondor.apana.org.au> - 2017-06-20 05:40 +0200
| From | Christophe JAILLET <christophe.jaillet@wanadoo.fr> |
|---|---|
| Date | 2017-06-10 15:00 +0200 |
| Subject | [PATCH] crypto: crypto4xx - fix an error code |
| Message-ID | <tQO9I-78u-7@gated-at.bofh.it> |
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> --- 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
[toc] | [next] | [standalone]
| From | Herbert Xu <herbert@gondor.apana.org.au> |
|---|---|
| Date | 2017-06-20 05:40 +0200 |
| Message-ID | <tUibg-3dx-11@gated-at.bofh.it> |
| In reply to | #1662950 |
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 <christophe.jaillet@wanadoo.fr> Patch applied. Thanks. -- Email: Herbert Xu <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web