summaryrefslogtreecommitdiffstats
path: root/net/rxrpc/input.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2016-06-18 11:44:03 +0300
committerDavid Howells <dhowells@redhat.com>2016-06-22 09:09:58 +0100
commit0e4699e4a37be4cfa07f0340cef6a3fa6a46f5f8 (patch)
treeb30879ac5a1734d71521923d429a407a2bf273dc /net/rxrpc/input.c
parent0e9390ebf1fe0d38f7df66a3d8183cbc5349a564 (diff)
downloadlinux-0e4699e4a37be4cfa07f0340cef6a3fa6a46f5f8.tar.gz
linux-0e4699e4a37be4cfa07f0340cef6a3fa6a46f5f8.tar.bz2
linux-0e4699e4a37be4cfa07f0340cef6a3fa6a46f5f8.zip
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: 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>
Diffstat (limited to 'net/rxrpc/input.c')
-rw-r--r--net/rxrpc/input.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/rxrpc/input.c b/net/rxrpc/input.c
index 47fb167af3e4..e11e4d785127 100644
--- a/net/rxrpc/input.c
+++ b/net/rxrpc/input.c
@@ -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);