[PATCH net-next] rxrpc: checking for IS_ERR() instead of NULL

Subsystems: networking [general], rxrpc sockets (af_rxrpc), the rest

STALE3681d

2 messages, 2 authors, 2016-07-15 · open the first message on its own page

[PATCH net-next] rxrpc: checking for IS_ERR() instead of NULL

From: David Howells <dhowells@redhat.com>
Date: 2016-07-14 15:23:54

From: Dan Carpenter <redacted>

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 <redacted>
Signed-off-by: David Howells <dhowells@redhat.com>
---

 net/rxrpc/conn_service.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
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;
 	}
 

Re: [PATCH net-next] rxrpc: checking for IS_ERR() instead of NULL

From: David Miller <davem@davemloft.net>
Date: 2016-07-15 21:16:47

From: David Howells <dhowells@redhat.com>
Date: Thu, 14 Jul 2016 15:47:01 +0100
From: Dan Carpenter <redacted>

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 <redacted>
Signed-off-by: David Howells <dhowells@redhat.com>
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help