From: Dan Carpenter Date: Thu, 14 Jul 2016 14:47:01 +0000 (+0100) Subject: rxrpc: checking for IS_ERR() instead of NULL X-Git-Tag: v4.8-rc1~140^2~112 X-Git-Url: http://git.cascardo.info/?p=cascardo%2Flinux.git;a=commitdiff_plain;h=7acef60455c4814a52afb8629d166a3b4dfa0ebb;ds=sidebyside 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 Signed-off-by: David Howells Signed-off-by: David S. Miller --- diff --git a/net/rxrpc/conn_service.c b/net/rxrpc/conn_service.c index 7cbd612be0d7..fd9027ccba8f 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; }