ctcm: fix error return code
authorPeter Senna Tschudin <peter.senna@gmail.com>
Mon, 24 Sep 2012 04:24:27 +0000 (04:24 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 Sep 2012 19:45:18 +0000 (15:45 -0400)
commitb8f37a4aa053c68836deca1ddeb509ce6f5ec0ae
tree9766fb5e93bb448dabfc75b453be2384e7293906
parent6531084c3eeaf302d6e3817776da6dab15603929
ctcm: 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: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/ctcm_main.c