kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] rxrpc: checking for IS_ERR() instead of NULL
@ 2016-07-12 14:14 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2016-07-12 14:14 UTC (permalink / raw)
  To: kernel-janitors

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>
---
I don't think this has been merged with net-next so I didn't CC David or
netdev.  Feel free to fold this into the original commit.

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;
 	}
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-07-12 14:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-12 14:14 [patch] rxrpc: checking for IS_ERR() instead of NULL Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).