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 37B07A0524; Mon, 19 Apr 2021 15:35:34 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7C02E41319; Mon, 19 Apr 2021 15:35:00 +0200 (CEST) Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) by mails.dpdk.org (Postfix) with ESMTP id 2689D412F7 for ; Mon, 19 Apr 2021 15:34:51 +0200 (CEST) Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4FP7623NHfzqTlV; Mon, 19 Apr 2021 21:32:26 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.498.0; Mon, 19 Apr 2021 21:34:40 +0800 From: "Min Hu (Connor)" To: CC: , , , , , , , , Date: Mon, 19 Apr 2021 21:34:48 +0800 Message-ID: <1618839289-33224-10-git-send-email-humin29@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1618839289-33224-1-git-send-email-humin29@huawei.com> References: <1618839289-33224-1-git-send-email-humin29@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH 09/10] net/e1000: add function return value check 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 Sender: "dev" From: HongBo Zheng Return value of a function 'e1000_phy_has_link_generic' called at e1000_kmrn_lock_loss_workaround_ich8lan is not checked, but it is usually checked for this function. This patch fix this problem. Fixes: 5a32a257f957 ("e1000: more NICs in base driver") Cc: stable@dpdk.org Signed-off-by: HongBo Zheng Signed-off-by: Min Hu (Connor) --- drivers/net/e1000/base/e1000_ich8lan.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c index 14f86b7..67adc46 100644 --- a/drivers/net/e1000/base/e1000_ich8lan.c +++ b/drivers/net/e1000/base/e1000_ich8lan.c @@ -5406,6 +5406,8 @@ STATIC s32 e1000_kmrn_lock_loss_workaround_ich8lan(struct e1000_hw *hw) * stability */ ret_val = e1000_phy_has_link_generic(hw, 1, 0, &link); + if (ret_val) + return ret_val; if (!link) return E1000_SUCCESS; -- 2.7.4