Skip to content

Commit

Permalink
crypto: tegra-aes - fix error return code
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
petersenna authored and herbertx committed Sep 27, 2012
1 parent b48ae1d commit 35c41db
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/crypto/tegra-aes.c
Original file line number Diff line number Diff line change
Expand Up @@ -969,6 +969,7 @@ static int tegra_aes_probe(struct platform_device *pdev)
aes_wq = alloc_workqueue("tegra_aes_wq", WQ_HIGHPRI | WQ_UNBOUND, 1);
if (!aes_wq) {
dev_err(dev, "alloc_workqueue failed\n");
err = -ENOMEM;
goto out;
}

Expand Down

0 comments on commit 35c41db

Please sign in to comment.