rxrpc: checking for IS_ERR() instead of NULL
Subsystems (4)
PATCH 1/1 rxrpc: checking for IS_ERR() instead of NULL
rxrpc_lookup_peer_rcu() returns NULL on error, it never returns error pointers.
Fixes be6e6707f6ee ('rxrpc: Rework peer object handling to use hash table and RCU')
Signed-off-by Dan Carpenter <[email protected]>
net/rxrpc/input.c +1 -1
@@ -639,7 +639,7 @@ static struct rxrpc_connection *rxrpc_conn_from_local(struct rxrpc_local *local,rxrpc_get_addr_from_skb (local, skb, &srx);rcu_read_lock (); peer =rxrpc_lookup_peer_rcu (local, &srx); -if (IS_ERR (peer)) +if (!peer) goto cant_find_peer; trans =rxrpc_find_transport (local, peer);
Quoted 5 lines · Dan Carpenter
rxrpc_lookup_peer_rcu()returns NULL on error, it never returns error pointers.Fixes be6e6707f6ee ('rxrpc: Rework peer object handling to use hash table and RCU')Signed-off-by Dan Carpenter <[email protected]>
Applied.