linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: oe-kbuild@lists.linux.dev, David Howells <dhowells@redhat.com>
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: [linux-next:pending-fixes 135/296] net/rxrpc/call_object.c:303 rxrpc_connect_call() warn: missing error code 'ret'
Date: Wed, 11 Jan 2023 07:29:34 +0300	[thread overview]
Message-ID: <202301111153.9eZRYLf1-lkp@intel.com> (raw)

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



             reply	other threads:[~2023-01-11  4:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-11  4:29 Dan Carpenter [this message]
2023-01-11  9:03 ` David Howells

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202301111153.9eZRYLf1-lkp@intel.com \
    --to=error27@gmail.com \
    --cc=dhowells@redhat.com \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=oe-kbuild@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox