All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Roi Dayan <roid@nvidia.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
	Saeed Mahameed <saeedm@nvidia.com>,
	Maor Dickman <maord@nvidia.com>,
	alexandr.lobakin@intel.com, dan.carpenter@oracle.com
Subject: Re: [PATCH net-next 1/1] net/mlx5e: Fix returning uninitialized err
Date: Tue, 30 Aug 2022 23:15:54 -0700	[thread overview]
Message-ID: <20220830231554.19eb87b7@kernel.org> (raw)
In-Reply-To: <0a6b1f5f-e470-a747-e45d-56648860d510@nvidia.com>

On Wed, 31 Aug 2022 08:40:28 +0300 Roi Dayan wrote:
> On 2022-08-30 3:20 PM, Roi Dayan wrote:
> > In the cited commit the function mlx5e_rep_add_meta_tunnel_rule()
> > was added and in success flow, err was returned uninitialized.
> > Fix it.
> > 
> > Fixes: 430e2d5e2a98 ("net/mlx5: E-Switch, Move send to vport meta rule creation")
> > Reported-by: Alexander Lobakin <alexandr.lobakin@intel.com>
> > Signed-off-by: Roi Dayan <roid@nvidia.com>
> > Reviewed-by: Maor Dickman <maord@nvidia.com>
> > ---
> >   drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 10 +++-------
> >   1 file changed, 3 insertions(+), 7 deletions(-)
> > 
> > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
> > index 914bddbfc1d7..e09bca78df75 100644
> > --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
> > +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
> > @@ -471,22 +471,18 @@ mlx5e_rep_add_meta_tunnel_rule(struct mlx5e_priv *priv)
> >   	struct mlx5_eswitch_rep *rep = rpriv->rep;
> >   	struct mlx5_flow_handle *flow_rule;
> >   	struct mlx5_flow_group *g;
> > -	int err;
> >   
> >   	g = esw->fdb_table.offloads.send_to_vport_meta_grp;
> >   	if (!g)
> >   		return 0;
> >   
> >   	flow_rule = mlx5_eswitch_add_send_to_vport_meta_rule(esw, rep->vport);
> > -	if (IS_ERR(flow_rule)) {
> > -		err = PTR_ERR(flow_rule);
> > -		goto out;
> > -	}
> > +	if (IS_ERR(flow_rule))
> > +		return PTR_ERR(flow_rule);
> >   
> >   	rpriv->send_to_vport_meta_rule = flow_rule;
> >   
> > -out:
> > -	return err;
> > +	return 0;
> >   }
> >   
> >   static void  
> 
> just noticed same patch from Nathan Chancellor.
> so can ignore this one.
> 
> [PATCH net-next] net/mlx5e: Do not use err uninitialized in 
> mlx5e_rep_add_meta_tunnel_rule()

Oh, I thought Saeed will take Nathan's patch thru his tree but since
there was no reply let me take it directly..

  reply	other threads:[~2022-08-31  6:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-30 12:20 [PATCH net-next 1/1] net/mlx5e: Fix returning uninitialized err Roi Dayan
2022-08-31  5:40 ` Roi Dayan
2022-08-31  6:15   ` Jakub Kicinski [this message]
2022-08-31  6:30 ` 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=20220830231554.19eb87b7@kernel.org \
    --to=kuba@kernel.org \
    --cc=alexandr.lobakin@intel.com \
    --cc=dan.carpenter@oracle.com \
    --cc=davem@davemloft.net \
    --cc=maord@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=roid@nvidia.com \
    --cc=saeedm@nvidia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.