]> 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>
Tue, 2 Oct 2012 06:00:35 +0000 (16:00 +1000)
commitc48c4d039427d5cc703902a66600e6701e75a25b
tree63dabd10ca94092f2a6815b7e0170ba088876ce9
parent937c054f3a06a5919eed7d9dc6e0a0838c04e61d
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