Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ffe55266 authored by Christophe Jaillet's avatar Christophe Jaillet Committed by Herbert Xu
Browse files

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: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 88d58ef8
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;