Julien Brunel cd55ef5a10 IB/mad: Test ib_create_send_mad() return with IS_ERR(), not == NULL
In case of error, the function ib_create_send_mad() returns an ERR
pointer, but never returns a NULL pointer.  So testing the return
value for error should be done with IS_ERR, not by comparing with
NULL.

A simplified version of the semantic patch that makes this change is
as follows:

(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@correct_null_test@
expression x,E;
statement S1, S2;
@@
x = ib_create_send_mad(...)
<... when != x = E
if (
(
- x@p2 != NULL
+ ! IS_ERR ( x )
|
- x@p2 == NULL
+ IS_ERR( x )
)
 )
S1
else S2
...>
? x = E;
// </smpl>

Signed-off-by: Julien Brunel <brunel@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-08-07 14:11:56 -07:00
..
2008-07-28 15:12:37 -07:00
2008-07-26 12:00:11 -07:00
2008-07-28 12:21:25 +02:00
2008-07-28 21:14:43 +02:00
2008-07-27 13:57:36 +02:00
2008-07-26 20:30:56 -07:00
2008-07-26 12:00:11 -07:00
2008-07-26 12:00:11 -07:00
2008-07-27 11:35:47 +03:00
2008-07-28 18:10:29 +09:00
2008-07-28 16:30:21 -07:00