* [patch net-next] rxrpc: checking for IS_ERR() instead of NULL
@ 2016-06-18 8:44 Dan Carpenter
2016-06-21 8:47 ` David Howells
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2016-06-18 8:44 UTC (permalink / raw)
To: David S. Miller, David Howells
Cc: Eric Dumazet, Willem de Bruijn, netdev, kernel-janitors
rxrpc_lookup_peer_rcu() returns NULL on error, it never returns error
pointers.
Fixes: be6e6707f6ee ('rxrpc: Rework peer object handling to use hash table and RCU')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/net/rxrpc/input.c b/net/rxrpc/input.c
index 47fb167..e11e4d7 100644
--- a/net/rxrpc/input.c
+++ b/net/rxrpc/input.c
@@ -639,7 +639,7 @@ static struct rxrpc_connection *rxrpc_conn_from_local(struct rxrpc_local *local,
rxrpc_get_addr_from_skb(local, skb, &srx);
rcu_read_lock();
peer = rxrpc_lookup_peer_rcu(local, &srx);
- if (IS_ERR(peer))
+ if (!peer)
goto cant_find_peer;
trans = rxrpc_find_transport(local, peer);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch net-next] rxrpc: checking for IS_ERR() instead of NULL
2016-06-18 8:44 [patch net-next] rxrpc: checking for IS_ERR() instead of NULL Dan Carpenter
@ 2016-06-21 8:47 ` David Howells
0 siblings, 0 replies; 2+ messages in thread
From: David Howells @ 2016-06-21 8:47 UTC (permalink / raw)
To: Dan Carpenter
Cc: dhowells, David S. Miller, Eric Dumazet, Willem de Bruijn, netdev,
kernel-janitors
Dan Carpenter <dan.carpenter@oracle.com> wrote:
> rxrpc_lookup_peer_rcu() returns NULL on error, it never returns error
> pointers.
>
> Fixes: be6e6707f6ee ('rxrpc: Rework peer object handling to use hash table and RCU')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-06-21 8:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-18 8:44 [patch net-next] rxrpc: checking for IS_ERR() instead of NULL Dan Carpenter
2016-06-21 8:47 ` David Howells
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox