Julia Lawall bcf4d812e6 drivers/net: Correct NULL test
Test the value that was just allocated rather than the previously tested one.

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

// <smpl>
@r@
expression *x;
expression e;
identifier l;
@@

if (x == NULL || ...) {
    ... when forall
    return ...; }
... when != goto l;
    when != x = e
    when != &x
*x == NULL
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-08 22:44:18 -08:00
..
2010-01-20 15:03:31 -08:00
2009-12-15 08:53:34 -08:00
2010-02-08 22:44:18 -08:00
2010-01-20 01:23:27 -05:00
2009-12-15 08:53:25 -08:00
2010-01-13 10:01:35 +00:00