[linux-next:pending-fixes 135/296] net/rxrpc/call_object.c:303 rxrpc_connect_call() warn: missing error code 'ret'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
| Reported-by: Dan Carpenter <error27@xxxxxxxxx>

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





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux