summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndi Shyti <andi@etezian.org>2013-07-16 15:35:01 +0200
committerRoland Dreier <roland@purestorage.com>2013-07-31 14:12:33 -0700
commit618af3846be1d29118b00529e68971e8c95d5b72 (patch)
tree3df408ff0457b31294ef2fff5c6c28290307ee2d
parentcd23b14b654769db83c9684ae1ba32c0e066670f (diff)
downloadlinux-618af3846be1d29118b00529e68971e8c95d5b72.tar.gz
mlx5_core: Variable may be used uninitialized
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>
Acked-by: Eli Cohen <eli@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
-rw-r--r--drivers/infiniband/hw/mlx5/qp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
index 16ac54c9819f..045f8cdbd303 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: