linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: jingxiangfeng@huawei.com
Cc: kuba@kernel.org, ktkhai@virtuozzo.com, pabeni@redhat.com,
	tklauser@distanz.ch, steffen.klassert@secunet.com, cai@lca.pw,
	pankaj.laxminarayan.bharadiya@intel.com, arnd@arndb.de,
	vcaputo@pengaru.com, edumazet@google.com, sd@queasysnail.net,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: unix: remove redundant assignment to variable 'err'
Date: Mon, 21 Sep 2020 14:52:00 -0700 (PDT)	[thread overview]
Message-ID: <20200921.145200.2255128901470643620.davem@davemloft.net> (raw)
In-Reply-To: <20200921032952.99894-1-jingxiangfeng@huawei.com>

From: Jing Xiangfeng <jingxiangfeng@huawei.com>
Date: Mon, 21 Sep 2020 11:29:52 +0800

> After commit 37ab4fa7844a ("net: unix: allow bind to fail on mutex lock"),
> the assignment to err is redundant. So remove it.
> 
> Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
 ...
> @@ -878,7 +878,6 @@ static int unix_autobind(struct socket *sock)
>  	if (err)
>  		return err;
>  
> -	err = 0;
>  	if (u->addr)
>  		goto out;

Yes, err is always zero here in this code path.

Applied, thanks.

      reply	other threads:[~2020-09-21 21:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-21  3:29 [PATCH] net: unix: remove redundant assignment to variable 'err' Jing Xiangfeng
2020-09-21 21:52 ` David Miller [this message]

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=20200921.145200.2255128901470643620.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=arnd@arndb.de \
    --cc=cai@lca.pw \
    --cc=edumazet@google.com \
    --cc=jingxiangfeng@huawei.com \
    --cc=ktkhai@virtuozzo.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pankaj.laxminarayan.bharadiya@intel.com \
    --cc=sd@queasysnail.net \
    --cc=steffen.klassert@secunet.com \
    --cc=tklauser@distanz.ch \
    --cc=vcaputo@pengaru.com \
    /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;
as well as URLs for NNTP newsgroup(s).