Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1443531

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

From David Howells <dhowells@redhat.com>
Newsgroups linux.kernel
Subject [PATCH net-next] rxrpc: checking for IS_ERR() instead of NULL
Date 2016-07-14 17:30 +0200
Message-ID <rUQKm-2Yl-21@gated-at.bofh.it> (permalink)
Organization Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903

Show all headers | View raw


From: Dan Carpenter <dan.carpenter@oracle.com>

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

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

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

[PATCH net-next] rxrpc: checking for IS_ERR() instead of NULL David Howells <dhowells@redhat.com> - 2016-07-14 17:30 +0200
  Re: [PATCH net-next] rxrpc: checking for IS_ERR() instead of NULL David Miller <davem@davemloft.net> - 2016-07-15 23:20 +0200

csiph-web