This patch fixes uninitialized auto_state value when querying FEC mode of device.
Bugzilla ID: 1498 Fixes: 9bf2ea8dbc65 ("net/hns3: support FEC") Cc: sta...@dpdk.org Signed-off-by: Jie Hai <haij...@huawei.com> Acked-by: Huisong Li <lihuis...@huawei.com> Acked-by: Chengwen Feng <fengcheng...@huawei.com> --- drivers/net/hns3/hns3_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c index ec1251cb7ead..8b43d731acae 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -6046,7 +6046,7 @@ hns3_fec_get_internal(struct hns3_hw *hw, uint32_t *fec_capa) { struct hns3_sfp_info_cmd *resp; uint32_t tmp_fec_capa; - uint8_t auto_state; + uint8_t auto_state = 0; struct hns3_cmd_desc desc; int ret; -- 2.33.0