* [linux-next:pending-fixes 135/296] net/rxrpc/call_object.c:303 rxrpc_connect_call() warn: missing error code 'ret'
@ 2023-01-11 4:29 Dan Carpenter
2023-01-11 9:03 ` David Howells
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2023-01-11 4:29 UTC (permalink / raw)
To: oe-kbuild, David Howells; +Cc: lkp, oe-kbuild-all, Linux Memory Management List
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git pending-fixes
head: 79fa898551af3fa16837f16294fdc8724b405762
commit: 9d35d880e0e4a3ab32d8c12f9e4d76198aadd42d [135/296] rxrpc: Move client call connection to the I/O thread
config: x86_64-randconfig-m001-20230109
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
smatch warnings:
net/rxrpc/call_object.c:303 rxrpc_connect_call() warn: missing error code 'ret'
vim +/ret +303 net/rxrpc/call_object.c
9d35d880e0e4a3 David Howells 2022-10-19 294 static int rxrpc_connect_call(struct rxrpc_call *call, gfp_t gfp)
9d35d880e0e4a3 David Howells 2022-10-19 295 {
9d35d880e0e4a3 David Howells 2022-10-19 296 struct rxrpc_local *local = call->local;
9d35d880e0e4a3 David Howells 2022-10-19 297 int ret = 0;
9d35d880e0e4a3 David Howells 2022-10-19 298
9d35d880e0e4a3 David Howells 2022-10-19 299 _enter("{%d,%lx},", call->debug_id, call->user_call_ID);
9d35d880e0e4a3 David Howells 2022-10-19 300
9d35d880e0e4a3 David Howells 2022-10-19 301 call->peer = rxrpc_lookup_peer(local, &call->dest_srx, gfp);
9d35d880e0e4a3 David Howells 2022-10-19 302 if (!call->peer)
9d35d880e0e4a3 David Howells 2022-10-19 @303 goto error;
It looks like returning zero is intentional here, but I'm not 100%
sure.
9d35d880e0e4a3 David Howells 2022-10-19 304
9d35d880e0e4a3 David Howells 2022-10-19 305 ret = rxrpc_look_up_bundle(call, gfp);
9d35d880e0e4a3 David Howells 2022-10-19 306 if (ret < 0)
9d35d880e0e4a3 David Howells 2022-10-19 307 goto error;
9d35d880e0e4a3 David Howells 2022-10-19 308
9d35d880e0e4a3 David Howells 2022-10-19 309 trace_rxrpc_client(NULL, -1, rxrpc_client_queue_new_call);
9d35d880e0e4a3 David Howells 2022-10-19 310 rxrpc_get_call(call, rxrpc_call_get_io_thread);
9d35d880e0e4a3 David Howells 2022-10-19 311 spin_lock(&local->client_call_lock);
9d35d880e0e4a3 David Howells 2022-10-19 312 list_add_tail(&call->wait_link, &local->new_client_calls);
9d35d880e0e4a3 David Howells 2022-10-19 313 spin_unlock(&local->client_call_lock);
9d35d880e0e4a3 David Howells 2022-10-19 314 rxrpc_wake_up_io_thread(local);
9d35d880e0e4a3 David Howells 2022-10-19 315 return 0;
9d35d880e0e4a3 David Howells 2022-10-19 316
9d35d880e0e4a3 David Howells 2022-10-19 317 error:
9d35d880e0e4a3 David Howells 2022-10-19 318 __set_bit(RXRPC_CALL_DISCONNECTED, &call->flags);
9d35d880e0e4a3 David Howells 2022-10-19 319 return ret;
9d35d880e0e4a3 David Howells 2022-10-19 320 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [linux-next:pending-fixes 135/296] net/rxrpc/call_object.c:303 rxrpc_connect_call() warn: missing error code 'ret'
2023-01-11 4:29 [linux-next:pending-fixes 135/296] net/rxrpc/call_object.c:303 rxrpc_connect_call() warn: missing error code 'ret' Dan Carpenter
@ 2023-01-11 9:03 ` David Howells
0 siblings, 0 replies; 2+ messages in thread
From: David Howells @ 2023-01-11 9:03 UTC (permalink / raw)
To: Dan Carpenter
Cc: dhowells, oe-kbuild, lkp, oe-kbuild-all, Linux Memory Management List
Good catch, thanks. That should be returning -ENOMEM.
David
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-01-11 9:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-11 4:29 [linux-next:pending-fixes 135/296] net/rxrpc/call_object.c:303 rxrpc_connect_call() warn: missing error code 'ret' Dan Carpenter
2023-01-11 9:03 ` David Howells
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox