@@ -92,7 +92,7 @@ static struct verbs_context *hns_roce_alloc_context(struct ibv_device *ibdev,
struct ibv_get_context cmd;
struct ibv_device_attr dev_attrs;
struct hns_roce_context *context;
- struct hns_roce_alloc_ucontext_resp resp;
+ struct hns_roce_alloc_ucontext_resp resp = {};
struct hns_roce_device *hr_dev = to_hr_dev(ibdev);
context = verbs_init_and_alloc_context(ibdev, cmd_fd, context, ibv_ctx,
@@ -89,7 +89,7 @@ struct ibv_pd *hns_roce_u_alloc_pd(struct ibv_context *context)
{
struct ibv_alloc_pd cmd;
struct hns_roce_pd *pd;
- struct hns_roce_alloc_pd_resp resp;
+ struct hns_roce_alloc_pd_resp resp = {};
pd = (struct hns_roce_pd *)malloc(sizeof(*pd));
if (!pd)