rxrpc: checking for IS_ERR() instead of NULL
authorDan Carpenter <[email protected]>
Thu, 14 Jul 2016 14:47:01 +0000 (15:47 +0100)
committerDavid S. Miller <[email protected]>
Fri, 15 Jul 2016 21:16:25 +0000 (14:16 -0700)
The rxrpc_lookup_peer() function returns NULL on error, it never returns
error pointers.

Fixes: 8496af50eb38 ('rxrpc: Use RCU to access a peer's service connection tree')
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: David Howells <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
net/rxrpc/conn_service.c

index 7cbd612be0d70297a6805ce23777b15a12e959fd..fd9027ccba8f592e17d09be6132b67658a18f95a 100644 (file)
@@ -163,7 +163,7 @@ struct rxrpc_connection *rxrpc_incoming_connection(struct rxrpc_local *local,
 
        if (!peer) {
                peer = rxrpc_lookup_peer(local, srx, GFP_NOIO);
-               if (IS_ERR(peer))
+               if (!peer)
                        goto enomem;
        }