Skip to content

Commit b48ae1d

Browse files
petersennaherbertx
authored andcommitted
crypto: crypto4xx - fix error return code
Convert a nonnegative error return code to a negative one, as returned elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when != ret = e1 when != &ret *if(...) { ... when != ret = e2 when forall return ret; } // </smpl> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent c2ff861 commit b48ae1d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎drivers/crypto/amcc/crypto4xx_core.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1226,6 +1226,7 @@ static int __init crypto4xx_probe(struct platform_device *ofdev)
12261226
core_dev->dev->ce_base = of_iomap(ofdev->dev.of_node, 0);
12271227
if (!core_dev->dev->ce_base) {
12281228
dev_err(dev, "failed to of_iomap\n");
1229+
rc = -ENOMEM;
12291230
goto err_iomap;
12301231
}
12311232

0 commit comments

Comments
 (0)