RDMA/rtrs: Fix the problem of variable not initialized fully
authorZhu Yanjun <yanjun.zhu@linux.dev>
Tue, 19 Sep 2023 02:08:06 +0000 (10:08 +0800)
committerLeon Romanovsky <leon@kernel.org>
Tue, 19 Sep 2023 09:30:33 +0000 (12:30 +0300)
No functionality change. The variable which is not initialized fully
will introduce potential risks.

Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev>
Link: https://lore.kernel.org/r/20230919020806.534183-1-yanjun.zhu@intel.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/ulp/rtrs/rtrs.c

index 3696f367ff5151333234c707ccad326385fdd59c..d80edfffd2e4959b52d6e9186589a385ccf3e8de 100644 (file)
@@ -255,7 +255,7 @@ static int create_cq(struct rtrs_con *con, int cq_vector, int nr_cqe,
 static int create_qp(struct rtrs_con *con, struct ib_pd *pd,
                     u32 max_send_wr, u32 max_recv_wr, u32 max_sge)
 {
-       struct ib_qp_init_attr init_attr = {NULL};
+       struct ib_qp_init_attr init_attr = {};
        struct rdma_cm_id *cm_id = con->cm_id;
        int ret;