]> git.karo-electronics.de Git - karo-tx-linux.git/commit
drivers/rapidio/devices/tsi721.c: fix error return code
authorPeter Senna Tschudin <peter.senna@gmail.com>
Fri, 28 Sep 2012 00:22:19 +0000 (10:22 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 5 Oct 2012 04:01:41 +0000 (14:01 +1000)
commit0f482a0baa74d6a14abeae019d987fea1c18d38c
tree96689cf11f4f7d3adbafb5f57590449fc9f1d781
parent18564e6a72ca64e90cb9a31864df6a94ecad64ea
drivers/rapidio/devices/tsi721.c: 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>
Acked-by: Alexandre Bounine <alexandre.bounine@idt.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/rapidio/devices/tsi721.c