From: Dan Carpenter <dan.carpenter@oracle.com>
To: Saeed Mahameed <saeedm@mellanox.com>
Cc: Leon Romanovsky <leon@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Vlad Buslov <vladbu@mellanox.com>, Roi Dayan <roid@mellanox.com>,
Paul Blakey <paulb@mellanox.com>, Eli Cohen <eli@mellanox.com>,
netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: [PATCH net-next] net/mlx5e: Uninitialized variable in mlx5e_attach_decap()
Date: Thu, 28 May 2020 15:48:03 +0300 [thread overview]
Message-ID: <20200528124803.GC1219412@mwanda> (raw)
The "ret" variable isn't initialized on the success path.
There is an uninitentional behavior in current releases of GCC where
instead of warning about the uninitialized variable, it instead
initializes it to zero. So that means that this bug likely doesn't
affect testing.
Fixes: 14e6b038afa0 ("net/mlx5e: Add support for hw decapsulation of MPLS over UDP")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
index 571da14809fec..ae53bf5994215 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
@@ -3637,7 +3637,7 @@ static int mlx5e_attach_decap(struct mlx5e_priv *priv,
struct mlx5e_decap_entry *d;
struct mlx5e_decap_key key;
uintptr_t hash_key;
- int err;
+ int err = 0;
parse_attr = attr->parse_attr;
if (sizeof(parse_attr->eth) > MLX5_CAP_ESW(priv->mdev, max_encap_header_size)) {
--
2.26.2
next reply other threads:[~2020-05-28 12:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-28 12:48 Dan Carpenter [this message]
2020-05-28 20:56 ` [PATCH net-next] net/mlx5e: Uninitialized variable in mlx5e_attach_decap() Saeed Mahameed
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=20200528124803.GC1219412@mwanda \
--to=dan.carpenter@oracle.com \
--cc=davem@davemloft.net \
--cc=eli@mellanox.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=paulb@mellanox.com \
--cc=roid@mellanox.com \
--cc=saeedm@mellanox.com \
--cc=vladbu@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;
as well as URLs for NNTP newsgroup(s).