RDMA/mlx4: Don't use uninitialized variable
authorLeon Romanovsky <leonro@mellanox.com>
Thu, 17 Aug 2017 12:50:34 +0000 (15:50 +0300)
committerDoug Ledford <dledford@redhat.com>
Thu, 24 Aug 2017 20:27:10 +0000 (16:27 -0400)
Avoid usage of uninitialized variable.

Fixes: 3078f5f1bd8b ("IB/mlx4: Add support for RSS QP")
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/mlx4/qp.c

index b40d50c643e1116cdeb8b28a9d2fe8376462bc12..f7ee1792ba6dde1a2bc3540ac2ae750a2f4cec85 100644 (file)
@@ -2027,8 +2027,8 @@ static u8 gid_type_to_qpc(enum ib_gid_type gid_type)
  */
 static int bringup_rss_rwqs(struct ib_rwq_ind_table *ind_tbl, u8 port_num)
 {
+       int err = 0;
        int i;
-       int err;
 
        for (i = 0; i < (1 << ind_tbl->log_ind_tbl_size); i++) {
                struct ib_wq *ibwq = ind_tbl->ind_tbl[i];