Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <dan.carpenter@oracle.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Dan Carpenter and committed by
David S. Miller
7acef604 77501a79

+1 -1
+1 -1
net/rxrpc/conn_service.c
··· 163 163 164 164 if (!peer) { 165 165 peer = rxrpc_lookup_peer(local, srx, GFP_NOIO); 166 - if (IS_ERR(peer)) 166 + if (!peer) 167 167 goto enomem; 168 168 } 169 169