Skip to content

Commit 7acef60

Browse files
Dan Carpenterdavem330
authored andcommitted
rxrpc: checking for IS_ERR() instead of NULL
The rxrpc_lookup_peer() function returns NULL on error, it never returns error pointers. Fixes: 8496af5 ('rxrpc: Use RCU to access a peer's service connection tree') Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: David Howells <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 77501a7 commit 7acef60

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/rxrpc/conn_service.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ struct rxrpc_connection *rxrpc_incoming_connection(struct rxrpc_local *local,
163163

164164
if (!peer) {
165165
peer = rxrpc_lookup_peer(local, srx, GFP_NOIO);
166-
if (IS_ERR(peer))
166+
if (!peer)
167167
goto enomem;
168168
}
169169

0 commit comments

Comments
 (0)