Skip to content

Commit

Permalink
rxrpc: Fix checker warning by not passing always-zero value to ERR_PTR()
Browse files Browse the repository at this point in the history
Fix the following checker warning:

	net/rxrpc/call_object.c:279 rxrpc_new_client_call()
	warn: passing zero to 'ERR_PTR'

where a value that's always zero is passed to ERR_PTR() so that it can be
passed to a tracepoint in an auxiliary pointer field.

Just pass NULL instead to the tracepoint.

Fixes: a84a46d ("rxrpc: Add some additional call tracing")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David Howells <dhowells@redhat.com>
  • Loading branch information
David Howells committed Oct 13, 2016
1 parent 233c9ed commit 54fde42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/rxrpc/call_object.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ struct rxrpc_call *rxrpc_new_client_call(struct rxrpc_sock *rx,
goto error;

trace_rxrpc_call(call, rxrpc_call_connected, atomic_read(&call->usage),
here, ERR_PTR(ret));
here, NULL);

spin_lock_bh(&call->conn->params.peer->lock);
hlist_add_head(&call->error_link,
Expand Down

0 comments on commit 54fde42

Please sign in to comment.