From: Leon Romanovsky <leonro@mellanox.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Saeed Mahameed <saeedm@mellanox.com>,
Matan Barak <matanb@mellanox.com>,
linux-rdma@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] net/mlx5: Uninitialized variable in esw_add_uc_addr()
Date: Thu, 10 Aug 2017 11:21:02 +0000 [thread overview]
Message-ID: <20170810112102.GU1423@mtr-leonro.local> (raw)
In-Reply-To: <20170809072418.e4x5xmbvboadhe5w@mwanda>
[-- Attachment #1: Type: text/plain, Size: 1156 bytes --]
On Thu, Aug 10, 2017 at 12:28:11AM +0300, Dan Carpenter wrote:
> "err" isn't initialized if we hit the "goto fdb_add;".
>
> Fixes: eeb66cdb6826 ("net/mlx5: Separate between E-Switch and MPFS")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
> index fd51f0ea8df9..baed45c0dabe 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
> @@ -376,7 +376,7 @@ static int esw_add_uc_addr(struct mlx5_eswitch *esw, struct vport_addr *vaddr)
> {
> u8 *mac = vaddr->node.addr;
> u32 vport = vaddr->vport;
> - int err;
> + int err = 0;
I'm not sure that it is the right error value which we want to return in
case of vprot == 0 was supplied.
Saeed ?
>
> /* Skip mlx5_mpfs_add_mac for PFs,
> * it is already done by the PF netdev in mlx5e_execute_l2_action
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2017-08-10 11:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-09 21:28 [PATCH] net/mlx5: Uninitialized variable in esw_add_uc_addr() Dan Carpenter
2017-08-10 11:21 ` Leon Romanovsky [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=20170810112102.GU1423@mtr-leonro.local \
--to=leonro@mellanox.com \
--cc=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=matanb@mellanox.com \
--cc=saeedm@mellanox.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