summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2016-07-14 15:47:01 +0100
committerDavid S. Miller <davem@davemloft.net>2016-07-15 14:16:25 -0700
commit7acef60455c4814a52afb8629d166a3b4dfa0ebb (patch)
tree529955a2c99c075f3c8e6940f83ff601aa1cf3bf /net
parent77501a79cec40eac65c59ee7af3f786c703ead9c (diff)
downloadop-kernel-dev-7acef60455c4814a52afb8629d166a3b4dfa0ebb.zip
op-kernel-dev-7acef60455c4814a52afb8629d166a3b4dfa0ebb.tar.gz
rxrpc: checking for IS_ERR() instead of NULL
The rxrpc_lookup_peer() function returns NULL on error, it never returns error pointers. Fixes: 8496af50eb38 ('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>
Diffstat (limited to 'net')
-rw-r--r--net/rxrpc/conn_service.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/rxrpc/conn_service.c b/net/rxrpc/conn_service.c
index 7cbd612..fd9027c 100644
--- a/net/rxrpc/conn_service.c
+++ b/net/rxrpc/conn_service.c
@@ -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;
}
OpenPOWER on IntegriCloud