Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Christophe Jaillet and committed by
Herbert Xu
ffe55266 88d58ef8

+1
+1
drivers/crypto/amcc/crypto4xx_core.c
··· 1179 1179 dev_set_drvdata(dev, core_dev); 1180 1180 core_dev->ofdev = ofdev; 1181 1181 core_dev->dev = kzalloc(sizeof(struct crypto4xx_device), GFP_KERNEL); 1182 + rc = -ENOMEM; 1182 1183 if (!core_dev->dev) 1183 1184 goto err_alloc_dev; 1184 1185