in the sq_overhead() function, if qp_typ is equal to IB_QPT_RC,
size will be used uninitialized.
Signed-off-by: Andi Shyti <[email protected]>
---
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
Acked-by: Eli Cohen <[email protected]>
On Tue, Jul 16, 2013 at 03:35:01PM +0200, Andi Shyti wrote:
> in the sq_overhead() function, if qp_typ is equal to IB_QPT_RC,
> size will be used uninitialized.
>
> Signed-off-by: Andi Shyti <[email protected]>
> ---
> 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
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html