[PATCH] net/hns3: fix uninitialized value
Jie Hai
haijie1 at huawei.com
Tue Jul 23 08:09:00 CEST 2024
This patch fixes uninitialized auto_state value when
querying FEC mode of device.
Bugzilla ID: 1498
Fixes: 9bf2ea8dbc65 ("net/hns3: support FEC")
Cc: stable at dpdk.org
Signed-off-by: Jie Hai <haijie1 at huawei.com>
Acked-by: Huisong Li <lihuisong at huawei.com>
Acked-by: Chengwen Feng <fengchengwen at 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
More information about the dev
mailing list