rxrpc: checking for IS_ERR() instead of NULL

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: be6e6707f6 ('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>
This commit is contained in:
Dan Carpenter
2016-06-18 11:44:03 +03:00
committed by David Howells
parent 0e9390ebf1
commit 0e4699e4a3
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -247,8 +247,8 @@ struct rxrpc_transport *rxrpc_name_to_transport(struct rxrpc_sock *rx,
/* 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);