lkml.org 
[lkml]   [2013]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] mlx5: qp: variable may be used uninitialized
Date
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


\
 
 \ /
  Last update: 2013-07-16 16:21    [W:0.025 / U:16.828 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site