]> 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>
Wed, 26 Sep 2012 01:34:58 +0000 (11:34 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 26 Sep 2012 05:45:39 +0000 (15:45 +1000)
commit5ac79c531003a024185b83e7299eb962898c06ac
tree3f5021087b8e67f01e96c74434947a6c0abfd147
parent07c353788b6a1a3ec7dbb50d0620d6bda30d938d
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