Julia Lawall c14ea0ca65 drivers/net/wan: Remove redundant test
arg is checked not to be NULL a few lines before.

A simplified version of the semantic patch that makes this change is as
follows: (http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r exists@
local idexpression x;
expression E;
position p1,p2;
@@

if (x@p1 == NULL || ...) { ... when forall
   return ...; }
... when != \(x=E\|x--\|x++\|--x\|++x\|x-=E\|x+=E\|x|=E\|x&=E\|&x\)
(
x@p2 == NULL
|
x@p2 != NULL
)

// another path to the test that is not through p1?
@s exists@
local idexpression r.x;
position r.p1,r.p2;
@@

... when != x@p1
(
x@p2 == NULL
|
x@p2 != NULL
)

@fix depends on !s@
position r.p1,r.p2;
expression x,E;
statement S1,S2;
@@

(
- if ((x@p2 != NULL) || ...)
  S1
|
- if ((x@p2 == NULL) && ...) S1
|
- BUG_ON(x@p2 == NULL);
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-25 18:03:44 -08:00
..
2008-12-17 15:37:55 -08:00
2008-12-25 16:50:41 -08:00
2008-12-25 17:23:50 -08:00
2008-12-08 01:14:16 -08:00
2008-12-22 19:54:00 -08:00
2008-12-19 15:24:06 -05:00
2008-12-08 01:14:16 -08:00
2008-11-25 18:26:20 -08:00
2008-11-25 18:12:49 -08:00
2008-10-27 17:06:18 -07:00
2008-11-25 18:25:32 -08:00
2008-12-08 01:14:16 -08:00
2008-10-27 17:06:18 -07:00
2008-07-18 17:54:17 -07:00
2008-10-09 12:22:38 -07:00
2008-12-16 23:54:23 -08:00
2008-08-13 16:05:38 -07:00
2008-08-13 16:05:37 -07:00
2008-08-13 16:05:37 -07:00
2008-09-03 14:38:00 -07:00
2008-09-22 19:27:10 -07:00
2008-11-21 17:31:51 -08:00
2008-11-16 12:41:35 -08:00
2008-11-20 20:28:00 -08:00
2008-11-25 18:24:20 -08:00
2008-12-08 01:14:16 -08:00
2008-11-21 17:37:54 -08:00
2008-11-25 18:23:59 -08:00
2008-11-21 17:36:36 -08:00
2008-11-25 18:24:57 -08:00
2008-12-08 23:50:18 -08:00
2008-07-25 15:44:44 +10:00
2008-08-14 04:26:38 -04:00
2008-10-27 17:06:18 -07:00
2008-12-08 01:14:16 -08:00
2008-11-25 18:24:38 -08:00
2008-12-02 15:00:28 -08:00
2008-10-27 17:06:18 -07:00
2008-12-08 01:14:16 -08:00
2008-11-21 17:39:02 -08:00
2008-11-25 18:23:35 -08:00
2008-12-03 22:10:38 -08:00
2008-11-25 18:26:38 -08:00
2008-10-27 17:06:18 -07:00
2008-11-21 17:35:40 -08:00
2008-12-08 01:14:16 -08:00
2008-12-25 18:03:28 -08:00
2008-12-16 01:23:49 -08:00
2008-10-17 02:38:35 +11:00
2008-10-27 17:06:18 -07:00
2008-11-10 15:11:56 -05:00
2008-11-10 15:11:56 -05:00
2008-11-21 17:37:24 -08:00
2008-08-07 02:20:57 -04:00
2008-08-07 01:55:50 -04:00
2008-10-22 06:22:13 -04:00
2008-10-27 17:06:18 -07:00
2008-11-25 18:23:06 -08:00
2008-11-25 18:25:49 -08:00
2008-12-08 01:14:16 -08:00
2008-12-08 01:14:16 -08:00
2008-08-29 02:13:33 -07:00
2008-08-29 02:14:29 -07:00
2008-08-29 02:14:43 -07:00
2008-10-27 17:06:18 -07:00
2008-12-21 20:21:18 -08:00
2008-11-25 18:21:56 -08:00
2008-10-27 17:06:18 -07:00