From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 746B6A05D3 for ; Wed, 22 May 2019 08:50:30 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B489D5398; Wed, 22 May 2019 08:50:29 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 6CE1E14EC; Wed, 22 May 2019 08:50:27 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 May 2019 23:50:26 -0700 X-ExtLoop1: 1 Received: from dipei-st-npg.sh.intel.com ([10.67.110.220]) by orsmga007.jf.intel.com with ESMTP; 21 May 2019 23:50:25 -0700 From: Andy Pei To: dev@dpdk.org Cc: andy.pei@intel.com, rosen.xu@intel.com, stable@dpdk.org Date: Wed, 22 May 2019 14:44:42 +0800 Message-Id: <1558507482-350757-1-git-send-email-andy.pei@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [PATCH] net/ipn3ke: delete identical branch 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" Whether the if statement is ture or not, the operation is identical. It is unnecessary to check the if statement, so just delete the if statement. Coverity issue: 337928 Fixes: c820468ac99c ("net/ipn3ke: support TM") Cc: rosen.xu@intel.com Cc: stable@dpdk.org Signed-off-by: Andy Pei --- drivers/net/ipn3ke/ipn3ke_tm.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/net/ipn3ke/ipn3ke_tm.c b/drivers/net/ipn3ke/ipn3ke_tm.c index 4bcf3aa..39c49bc 100644 --- a/drivers/net/ipn3ke/ipn3ke_tm.c +++ b/drivers/net/ipn3ke/ipn3ke_tm.c @@ -1541,23 +1541,12 @@ struct ipn3ke_tm_shaper_params_range_type ipn3ke_tm_shaper_params_rang[] = { NULL, rte_strerror(EINVAL)); } - } else if (n->node_state == - IPN3KE_TM_NODE_STATE_CONFIGURED_DEL) { - if (n->level != IPN3KE_TM_NODE_LEVEL_VT || - n->n_children != 0) { - return -rte_tm_error_set(error, - EINVAL, - RTE_TM_ERROR_TYPE_UNSPECIFIED, - NULL, - rte_strerror(EINVAL)); - } else { - return -rte_tm_error_set(error, + } else if (n->node_state == IPN3KE_TM_NODE_STATE_CONFIGURED_DEL) + return -rte_tm_error_set(error, EINVAL, RTE_TM_ERROR_TYPE_UNSPECIFIED, NULL, rte_strerror(EINVAL)); - } - } } n = tm->h.port_commit_node; -- 1.8.3.1