From patchwork Thu Jul 18 14:44:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herakliusz Lipiec X-Patchwork-Id: 56724 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 53EA04C90; Thu, 18 Jul 2019 16:43:46 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 519241B53; Thu, 18 Jul 2019 16:43:44 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jul 2019 07:43:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,278,1559545200"; d="scan'208";a="168286260" Received: from silpixa00399499.ir.intel.com (HELO silpixa00399499.ger.corp.intel.com) ([10.237.222.58]) by fmsmga008.fm.intel.com with ESMTP; 18 Jul 2019 07:43:42 -0700 From: Herakliusz Lipiec To: Beilei Xing , Qi Zhang Cc: dev@dpdk.org, Herakliusz Lipiec , stable@dpdk.org Date: Thu, 18 Jul 2019 15:44:48 +0100 Message-Id: <20190718144448.13286-1-herakliusz.lipiec@intel.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20190718131623.22047-1-herakliusz.lipiec@intel.com> References: <20190718131623.22047-1-herakliusz.lipiec@intel.com> Subject: [dpdk-dev] [PATCH v2] net/i40e: add return check coverity 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" add return check for i40e_vsi_delete_mac call in rte_pmd_i40e_remove_vf_mac_addr as per coverity issue. v2: add a fixline to commit message Coverity Issue: 277224 Cc: stable@dpdk.org Fixes: e0cb96204b71 ("net/i40e: add support for representor ports") Signed-off-by: Herakliusz Lipiec Acked-by: Beilei Xing --- drivers/net/i40e/rte_pmd_i40e.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/i40e/rte_pmd_i40e.c b/drivers/net/i40e/rte_pmd_i40e.c index 24281c293..4c3c7088a 100644 --- a/drivers/net/i40e/rte_pmd_i40e.c +++ b/drivers/net/i40e/rte_pmd_i40e.c @@ -581,6 +581,7 @@ rte_pmd_i40e_remove_vf_mac_addr(uint16_t port, uint16_t vf_id, struct i40e_pf_vf *vf; struct i40e_vsi *vsi; struct i40e_pf *pf; + int ret; if (i40e_validate_mac_addr((u8 *)mac_addr) != I40E_SUCCESS) return -EINVAL; @@ -609,8 +610,9 @@ rte_pmd_i40e_remove_vf_mac_addr(uint16_t port, uint16_t vf_id, rte_ether_addr_copy(&null_mac_addr, &vf->mac_addr); /* Remove the mac */ - i40e_vsi_delete_mac(vsi, mac_addr); - + ret = i40e_vsi_delete_mac(vsi, mac_addr); + if (ret != I40E_SUCCESS) + return ret; return 0; }