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 2DF13A054F; Tue, 16 Mar 2021 07:29:29 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 20A654069F; Tue, 16 Mar 2021 07:29:28 +0100 (CET) Received: from relay.smtp-ext.broadcom.com (lpdvacalvio01.broadcom.com [192.19.229.182]) by mails.dpdk.org (Postfix) with ESMTP id 1A34740042 for ; Tue, 16 Mar 2021 07:29:26 +0100 (CET) Received: from dhcp-10-123-153-22.dhcp.broadcom.net (bgccx-dev-host-lnx2.bec.broadcom.net [10.123.153.22]) by relay.smtp-ext.broadcom.com (Postfix) with ESMTP id 3FE42E9; Mon, 15 Mar 2021 23:29:24 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com 3FE42E9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1615876165; bh=Oa77M+FLiiAEY60wWCr1xT9yVXnDtca/8an34990szM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eVkOaCumqobNklTMh2KnpQtugyGws7mAeb5KWkEJiwU2V2MBVZJLiEEv9L0llnPiz MzAoSqt1vaPpunza84PnpYc28+fs06aSQNCULud6AFM3xx68m5jCFVao/yg/5rOZ4G RO06pq/nYHNqj/KvrKcX1jE/DmhCSJqMrH6/dEnM= From: Kalesh A P To: dev@dpdk.org Cc: xiaoyun.li@intel.com, ferruh.yigit@intel.com Date: Tue, 16 Mar 2021 12:21:36 +0530 Message-Id: <20210316065136.2907-1-kalesh-anakkur.purayil@broadcom.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20210316045518.20234-1-kalesh-anakkur.purayil@broadcom.com> References: <20210316045518.20234-1-kalesh-anakkur.purayil@broadcom.com> Subject: [dpdk-dev] [PATCH] app/testpmd: fix unchecked return value 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: Kalesh AP This patch checks return value for rte_eth_dev_info_get() in show_macs(). Coverity issue: 353629 Fixes: e1d44d0ad623 ("app/testpmd: show MAC addresses added to a port") Cc: stable@dpdk.org Signed-off-by: Kalesh AP --- app/test-pmd/config.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 576d5ac..4ce75a8 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -4930,7 +4930,8 @@ show_macs(portid_t port_id) dev = &rte_eth_devices[port_id]; - rte_eth_dev_info_get(port_id, &dev_info); + if (eth_dev_info_get_print_err(port_id, &dev_info)) + return; for (i = 0; i < dev_info.max_mac_addrs; i++) { addr = &dev->data->mac_addrs[i]; -- 2.10.1