Julia Lawall 13eea19213 drivers/net/ax88796.c: Return error code in failure
In this code, 0 is returned on failure, even though other
failures return -ENOMEM or other similar values.

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

// <smpl>
@a@
identifier alloc;
identifier ret;
constant C;
expression x;
@@

x = alloc(...);
if (x == NULL) { <+... \(ret = -C; \| return -C; \) ...+> }

@@
identifier f, a.alloc;
expression ret;
expression x,e1,e2,e3;
@@

ret = 0
... when != ret = e1
*x = alloc(...)
... when != ret = e2
if (x == NULL) { ... when != ret = e3
  return ret;
}
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-10-21 04:25:50 -07:00
..
2010-08-24 12:21:13 -07:00
2010-05-10 05:01:31 -07:00
2010-09-29 19:45:37 -07:00
2010-10-21 03:59:57 -07:00
2010-10-21 03:09:43 -07:00
2010-09-26 18:34:29 -07:00
2010-09-26 18:34:29 -07:00
2010-05-10 05:01:31 -07:00
2010-06-03 03:18:23 -07:00
2010-07-19 15:27:13 -07:00
2010-07-11 18:15:08 -07:00
2010-07-11 18:15:08 -07:00
2010-08-24 12:24:07 -07:00
2010-09-26 18:34:29 -07:00
2010-09-26 18:34:29 -07:00
2010-10-06 14:10:35 -07:00
2010-10-14 10:45:56 -07:00
2010-10-14 10:45:56 -07:00
2010-10-14 10:45:56 -07:00
2010-07-19 13:32:57 -07:00
2010-07-14 13:40:36 -07:00
2010-05-10 05:01:31 -07:00
2010-09-26 18:34:29 -07:00
2010-09-26 18:34:29 -07:00
2010-09-29 13:23:30 -07:00
2010-09-26 18:34:29 -07:00
2010-05-10 05:01:31 -07:00
2010-09-26 18:34:29 -07:00
2010-08-24 12:23:01 -07:00
2010-09-26 18:34:29 -07:00
2010-10-21 01:26:46 -07:00
2010-05-10 05:01:31 -07:00
2010-10-21 03:52:11 -07:00
2010-10-21 03:52:11 -07:00
2010-07-27 22:24:37 -07:00
2010-09-08 21:47:13 -07:00
2010-09-26 18:34:29 -07:00
2010-05-10 05:01:31 -07:00
2010-09-26 18:34:29 -07:00
2010-06-21 13:40:25 -07:00
2010-07-05 20:08:05 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-06-28 12:41:33 -07:00
2010-09-26 18:34:29 -07:00
2010-09-15 22:06:05 -07:00
2010-08-04 21:53:17 -07:00
2010-08-04 21:53:17 -07:00
2010-09-21 18:04:47 -07:00
2010-09-21 18:04:47 -07:00
2010-09-21 18:04:47 -07:00
2010-07-15 20:46:22 -07:00
2010-08-25 16:41:26 -07:00
2010-05-10 05:01:31 -07:00
2010-09-26 18:34:29 -07:00
2010-06-03 03:18:23 -07:00
2010-09-26 18:34:29 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-07-14 12:17:35 -07:00
2010-09-26 18:34:29 -07:00
2010-09-26 18:34:29 -07:00
2010-09-26 18:34:29 -07:00
2010-10-17 13:57:44 -07:00
2010-09-26 18:34:29 -07:00
2010-09-26 18:34:29 -07:00
2010-09-26 18:34:29 -07:00
2010-06-03 03:18:23 -07:00
2010-09-26 18:34:29 -07:00
2010-05-10 05:01:31 -07:00