Julia Lawall a3786a5ff7 cosa: fix error return code
Return a negative error code on failure.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
identifier ret; expression e1,e2;
@@
(
if (\(ret < 0\|ret != 0\))
 { ... return ret; }
|
ret = 0
)
... when != ret = e1
    when != &ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-07 15:21:55 -04:00
..
2015-03-24 16:42:54 -07:00
2015-02-17 09:27:54 -08:00
2015-02-15 10:48:44 -08:00
2015-03-24 15:39:26 +01:00
2015-04-01 10:29:05 -07:00
2015-02-03 15:48:51 -08:00
2015-03-02 16:43:41 -05:00
2015-02-03 15:58:39 -08:00
2015-04-07 15:21:55 -04:00
2015-02-04 09:15:18 +01:00
2015-03-12 09:45:46 -07:00
2015-03-31 12:01:19 -04:00
2015-02-18 08:40:29 +01:00
2015-02-17 09:38:59 -08:00
2015-04-01 13:42:58 +02:00
2015-02-15 10:24:55 -08:00
2015-04-02 13:53:53 -07:00
2015-02-03 15:58:39 -08:00