From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C5071A04B3; Tue, 28 Jan 2020 08:32:10 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B10AD1C132; Tue, 28 Jan 2020 08:31:02 +0100 (CET) Received: from relay.smtp.broadcom.com (unknown [192.19.211.62]) by dpdk.org (Postfix) with ESMTP id E531F1C0C9 for ; Tue, 28 Jan 2020 08:30:49 +0100 (CET) Received: from dhcp-10-123-153-55.dhcp.broadcom.net (bgccx-dev-host-lnx35.bec.broadcom.net [10.123.153.55]) by relay.smtp.broadcom.com (Postfix) with ESMTP id 8004729051C; Mon, 27 Jan 2020 23:30:49 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 relay.smtp.broadcom.com 8004729051C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1580196649; bh=kS/vdRjL4cG+IU3TxCPvu4DWoG5dHp/by1GElb/YT6M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RDkQULhty3SX4faYEu0ocD9KYcOUCpov7dc5/ipZCqkxCrKr6YZGOpJqokp6mFZ9q ChGzr0qow08vk0GVOk2Oxf2pA5KutSL2io01ZQDIcuD/OC/yC7Gf0YqvNfXXyGEx/h Yi3vKtjquwlNaoXhHLuc9s0Z6voULd+MPIBDYcV0= From: Somnath Kotur To: dev@dpdk.org Cc: ferruh.yigit@intel.com Date: Tue, 28 Jan 2020 12:59:23 +0530 Message-Id: <20200128072923.9912-10-somnath.kotur@broadcom.com> X-Mailer: git-send-email 2.10.1.613.g2cc2e70 In-Reply-To: <20200128072923.9912-1-somnath.kotur@broadcom.com> References: <20200128072923.9912-1-somnath.kotur@broadcom.com> Subject: [dpdk-dev] [PATCH 9/9] net/bnxt: fix coverity warnings X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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 return value stored in "ret" but it has been overwritten before use. CID 353621: Code maintainability issues (UNUSED_VALUE) Fixes: 57813868 ("net/bnxt: fix VLAN strip") Fixes: df6cd7c1 ("net/bnxt: handle reset notify async event from FW") Signed-off-by: Kalesh AP Reviewed-by: Ajit Khaparde Signed-off-by: Somnath Kotur --- drivers/net/bnxt/bnxt_ethdev.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 72e5441..c1cb401 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -1956,9 +1956,15 @@ static int bnxt_free_one_vnic(struct bnxt *bp, uint16_t vnic_id) if (bp->eth_dev->data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_VLAN_FILTER) { rc = bnxt_add_vlan_filter(bp, 0); - bnxt_restore_vlan_filters(bp); + if (rc) + return rc; + rc = bnxt_restore_vlan_filters(bp); + if (rc) + return rc; } else { rc = bnxt_add_mac_filter(bp, vnic, NULL, 0, 0); + if (rc) + return rc; } rc = bnxt_hwrm_cfa_l2_set_rx_mask(bp, vnic, 0, NULL); @@ -3961,10 +3967,16 @@ static int bnxt_restore_filters(struct bnxt *bp) struct rte_eth_dev *dev = bp->eth_dev; int ret = 0; - if (dev->data->all_multicast) + if (dev->data->all_multicast) { ret = bnxt_allmulticast_enable_op(dev); - if (dev->data->promiscuous) + if (ret) + return ret; + } + if (dev->data->promiscuous) { ret = bnxt_promiscuous_enable_op(dev); + if (ret) + return ret; + } ret = bnxt_restore_mac_filters(bp); if (ret) -- 1.8.3.1