From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id CE2804568D; Tue, 23 Jul 2024 08:14:51 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8DF3D427A2; Tue, 23 Jul 2024 08:14:48 +0200 (CEST) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id 0A03240289 for ; Tue, 23 Jul 2024 08:09:17 +0200 (CEST) Received: from mail.maildlp.com (unknown [172.19.163.174]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4WSmnQ0MWLzyN3J; Tue, 23 Jul 2024 14:04:26 +0800 (CST) Received: from kwepemf500004.china.huawei.com (unknown [7.202.181.242]) by mail.maildlp.com (Postfix) with ESMTPS id 4EB38140427; Tue, 23 Jul 2024 14:09:15 +0800 (CST) Received: from localhost.huawei.com (10.90.30.45) by kwepemf500004.china.huawei.com (7.202.181.242) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Tue, 23 Jul 2024 14:09:14 +0800 From: Jie Hai To: , , Yisen Zhuang , "Wei Hu (Xavier)" , "Min Hu (Connor)" , Chengchang Tang , Chengwen Feng CC: Subject: [PATCH] net/hns3: fix uninitialized value Date: Tue, 23 Jul 2024 14:09:00 +0800 Message-ID: <20240723060900.4102533-1-haijie1@huawei.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.90.30.45] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemf500004.china.huawei.com (7.202.181.242) X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org This patch fixes uninitialized auto_state value when querying FEC mode of device. Bugzilla ID: 1498 Fixes: 9bf2ea8dbc65 ("net/hns3: support FEC") Cc: stable@dpdk.org Signed-off-by: Jie Hai Acked-by: Huisong Li Acked-by: Chengwen Feng --- 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