Repository navigation
Commit c2ff861
crypto: hifn_795x - 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 79c09c1 commit c2ff861
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2611 | 2611 | | |
2612 | 2612 | | |
2613 | 2613 | | |
2614 | | - | |
| 2614 | + | |
| 2615 | + | |
2615 | 2616 | | |
| 2617 | + | |
2616 | 2618 | | |
2617 | 2619 | | |
2618 | 2620 | | |
2619 | 2621 | | |
2620 | 2622 | | |
2621 | 2623 | | |
| 2624 | + | |
2622 | 2625 | | |
2623 | 2626 | | |
2624 | 2627 | | |
| |||
0 commit comments