From patchwork Sun Oct 25 00:29:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qi Zhang X-Patchwork-Id: 82079 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 16A22A04B5; Sun, 25 Oct 2020 02:29:56 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B70D52BFA; Sun, 25 Oct 2020 02:26:31 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id D87A9295B for ; Sun, 25 Oct 2020 02:26:14 +0200 (CEST) IronPort-SDR: bW8EL4uJV70tNP6e9p9/7VOXJqIGS+EVjSBNZ7NR8sAIceppxmPN9NmJH/hY+rKHAJDL6wGmdX E1NH7ARobSpA== X-IronPort-AV: E=McAfee;i="6000,8403,9784"; a="167927040" X-IronPort-AV: E=Sophos;i="5.77,414,1596524400"; d="scan'208";a="167927040" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Oct 2020 17:26:14 -0700 IronPort-SDR: 9AujsRuqkMcPmefysJVt2GvPUcm5oYgs+d3xQhJT+v8XqhyGVxbIP4l9ihxs/UWliqOOErDW8r os4MBoppY+2g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,414,1596524400"; d="scan'208";a="359984077" Received: from dpdk51.sh.intel.com ([10.67.111.142]) by FMSMGA003.fm.intel.com with ESMTP; 24 Oct 2020 17:26:13 -0700 From: Qi Zhang To: qiming.yang@intel.com Cc: dev@dpdk.org, Qi Zhang , Tony Nguyen Date: Sun, 25 Oct 2020 08:29:44 +0800 Message-Id: <20201025002953.1680999-13-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20201025002953.1680999-1-qi.z.zhang@intel.com> References: <20201025002953.1680999-1-qi.z.zhang@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v2 12/21] net/ice/base: return error directly 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" As there is nothing to unroll, return the error directly. Remove the label as this is the only reference to that label. Signed-off-by: Tony Nguyen Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_sched.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c index 16314ef18e..7867d4fda8 100644 --- a/drivers/net/ice/base/ice_sched.c +++ b/drivers/net/ice/base/ice_sched.c @@ -2662,10 +2662,9 @@ ice_sched_cfg_agg(struct ice_port_info *pi, u32 agg_id, /* Create new entry for new aggregator ID */ agg_info = (struct ice_sched_agg_info *) ice_malloc(hw, sizeof(*agg_info)); - if (!agg_info) { - status = ICE_ERR_NO_MEMORY; - goto exit_reg_agg; - } + if (!agg_info) + return ICE_ERR_NO_MEMORY; + agg_info->agg_id = agg_id; agg_info->agg_type = agg_type; agg_info->tc_bitmap[0] = 0; @@ -2698,7 +2697,7 @@ ice_sched_cfg_agg(struct ice_port_info *pi, u32 agg_id, /* Save aggregator node's TC information */ ice_set_bit(tc, agg_info->tc_bitmap); } -exit_reg_agg: + return status; }