net/mlx5: fix crash in device probe
[dpdk.git] / drivers / net / mlx5 / mlx5.c
index d27ee96..3e0a1b1 100644 (file)
@@ -672,7 +672,7 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
        int i;
        struct mlx5dv_context attrs_out = {0};
 #ifdef HAVE_IBV_DEVICE_COUNTERS_SET_SUPPORT
-       struct ibv_counter_set_description cs_desc;
+       struct ibv_counter_set_description cs_desc = { .counter_type = 0 };
 #endif
 
        /* Prepare shared data between primary and secondary process. */