From: Andi Shyti <andi@etezian.org>
To: eli@mellanox.com, roland@kernel.org, sean.hefty@intel.com,
hal.rosenstock@gmail.com
Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
andi@etezian.org
Subject: [PATCH] mlx5: qp: variable may be used uninitialized
Date: Tue, 16 Jul 2013 15:35:01 +0200 [thread overview]
Message-ID: <1373981701-15276-1-git-send-email-andi@etezian.org> (raw)
in the sq_overhead() function, if qp_typ is equal to IB_QPT_RC,
size will be used uninitialized.
Signed-off-by: Andi Shyti <andi@etezian.org>
---
drivers/infiniband/hw/mlx5/qp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
index 16ac54c..045f8cd 100644
--- a/drivers/infiniband/hw/mlx5/qp.c
+++ b/drivers/infiniband/hw/mlx5/qp.c
@@ -199,7 +199,7 @@ static int set_rq_size(struct mlx5_ib_dev *dev, struct ib_qp_cap *cap,
static int sq_overhead(enum ib_qp_type qp_type)
{
- int size;
+ int size = 0;
switch (qp_type) {
case IB_QPT_XRC_INI:
--
1.8.3.2
next reply other threads:[~2013-07-16 13:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-16 13:35 Andi Shyti [this message]
2013-07-17 16:06 ` [PATCH] mlx5: qp: variable may be used uninitialized Eli Cohen
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=1373981701-15276-1-git-send-email-andi@etezian.org \
--to=andi@etezian.org \
--cc=eli@mellanox.com \
--cc=hal.rosenstock@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=roland@kernel.org \
--cc=sean.hefty@intel.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