linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nikolay Aleksandrov <nikolay@nvidia.com>
To: Colin King <colin.king@canonical.com>,
	Roopa Prabhu <roopa@nvidia.com>,
	"David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Vladimir Oltean <vladimir.oltean@nxp.com>,
	bridge@lists.linux-foundation.org, netdev@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] net: bridge: Fix missing return assignment from br_vlan_replay_one call
Date: Wed, 24 Mar 2021 20:50:43 +0200	[thread overview]
Message-ID: <db4c13bf-e32a-d59a-a491-9a81ca292e59@nvidia.com> (raw)
In-Reply-To: <20210324150950.253698-1-colin.king@canonical.com>

On 24/03/2021 17:09, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The call to br_vlan_replay_one is returning an error return value but
> this is not being assigned to err and the following check on err is
> currently always false because err was initialized to zero. Fix this
> by assigning err.
> 
> Addresses-Coverity: ("'Constant' variable guards dead code")
> Fixes: 22f67cdfae6a ("net: bridge: add helper to replay VLANs installed on port")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  net/bridge/br_vlan.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/bridge/br_vlan.c b/net/bridge/br_vlan.c
> index ca8daccff217..7422691230b1 100644
> --- a/net/bridge/br_vlan.c
> +++ b/net/bridge/br_vlan.c
> @@ -1815,7 +1815,7 @@ int br_vlan_replay(struct net_device *br_dev, struct net_device *dev,
>  		if (!br_vlan_should_use(v))
>  			continue;
>  
> -		br_vlan_replay_one(nb, dev, &vlan, extack);
> +		err = br_vlan_replay_one(nb, dev, &vlan, extack);
>  		if (err)
>  			return err;
>  	}
> 

Thanks,
Acked-by: Nikolay Aleksandrov <nikolay@nvidia.com>


  parent reply	other threads:[~2021-03-24 18:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-24 15:09 [PATCH][next] net: bridge: Fix missing return assignment from br_vlan_replay_one call Colin King
2021-03-24 16:02 ` Vladimir Oltean
2021-03-24 18:50 ` Nikolay Aleksandrov [this message]
2021-03-24 19:50 ` patchwork-bot+netdevbpf

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=db4c13bf-e32a-d59a-a491-9a81ca292e59@nvidia.com \
    --to=nikolay@nvidia.com \
    --cc=bridge@lists.linux-foundation.org \
    --cc=colin.king@canonical.com \
    --cc=davem@davemloft.net \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=roopa@nvidia.com \
    --cc=vladimir.oltean@nxp.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).