Skip to content

Commit

Permalink
rxrpc: checking for IS_ERR() instead of NULL
Browse files Browse the repository at this point in the history
The rxrpc_lookup_peer() function returns NULL on error, it never returns
error pointers.

Fixes: 8496af5 ('rxrpc: Use RCU to access a peer's service connection tree')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Jul 15, 2016
1 parent 77501a7 commit 7acef60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/rxrpc/conn_service.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 7acef60

Please sign in to comment.