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 06251A04B3; Tue, 28 Jan 2020 22:03:28 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B2CF01D5EC; Tue, 28 Jan 2020 22:02:21 +0100 (CET) Received: from rnd-relay.smtp.broadcom.com (rnd-relay.smtp.broadcom.com [192.19.229.170]) by dpdk.org (Postfix) with ESMTP id C08F41D5A8; Tue, 28 Jan 2020 22:02:06 +0100 (CET) Received: from mail-irv-17.broadcom.com (mail-irv-17.lvn.broadcom.net [10.75.242.48]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id EE3D830C20A; Tue, 28 Jan 2020 12:55:11 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com EE3D830C20A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1580244912; bh=sMEATyeK2joaCjjo25SxvIjjfPLG/YXfXzB9OrE5R60=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YaUHbWV6EhVyBIMxEevW6/8MQU191ME2M3NIeheRq6sE3dVtRLjXj/qCiW1IwCnfb BC2yN0uJcUGXZumUFQH6QMx2D/4x1BDYbOtmnhLo611JouTDQgFUpzOYSpHxdMJ1f6 aRM9u2nRwy87+cN4K0BcU0ixMeBdfpOKwd8YWLGA= Received: from C02VPB22HTD6.wifi.broadcom.net (c02vpb22htd6.wifi.broadcom.net [10.69.74.102]) by mail-irv-17.broadcom.com (Postfix) with ESMTP id 7F71114008B; Tue, 28 Jan 2020 13:02:05 -0800 (PST) From: Ajit Khaparde To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Kalesh AP , stable@dpdk.org, Somnath Kotur Date: Tue, 28 Jan 2020 13:01:59 -0800 Message-Id: <20200128210159.6972-10-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.21.0 (Apple Git-122.2) In-Reply-To: <20200128210159.6972-1-ajit.khaparde@broadcom.com> References: <20200128072923.9912-1-somnath.kotur@broadcom.com> <20200128210159.6972-1-ajit.khaparde@broadcom.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 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: 7fe5668d2ea3 ("net/bnxt: support VLAN filter and strip") Fixes: df6cd7c1f73a ("net/bnxt: handle reset notify async event from FW") Cc: stable@dpdk.org 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 72e544170..c1cb40160 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -1956,9 +1956,15 @@ bnxt_config_vlan_hw_stripping(struct bnxt *bp, uint64_t rx_offloads) 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) -- 2.21.0 (Apple Git-122.2)