rxrpc_lookup_peer_rcu() and rxrpc_lookup_peer() return NULL on error, never
error pointers, so IS_ERR() can't be used.
Fix three callers of those functions.
Fixes:
be6e6707f6ee ('rxrpc: Rework peer object handling to use hash table and RCU')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David Howells <dhowells@redhat.com>
/* find a remote transport endpoint from the local one */
peer = rxrpc_lookup_peer(rx->local, srx, gfp);
- if (IS_ERR(peer))
- return ERR_CAST(peer);
+ if (!peer)
+ return ERR_PTR(-ENOMEM);
/* find a transport */
trans = rxrpc_get_transport(rx->local, peer, gfp);
notification->mark = RXRPC_SKB_MARK_NEW_CALL;
peer = rxrpc_lookup_peer(local, srx, GFP_NOIO);
- if (IS_ERR(peer)) {
+ if (!peer) {
_debug("no peer");
ret = -EBUSY;
goto error;
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);