From patchwork Tue Oct 20 22:48:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qi Zhang X-Patchwork-Id: 81643 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 57C5CA04DD; Wed, 21 Oct 2020 00:48:51 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9D741ACF8; Wed, 21 Oct 2020 00:45:23 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 15926ACCB for ; Wed, 21 Oct 2020 00:45:09 +0200 (CEST) IronPort-SDR: UpsPRRVTpdctF7Mb4qxzd9MnSf78o7Fe8pzM7XYleHtXKTxQTb0oPvCWvwZKNXwXDMDQZDXUgr scqsppoutVdg== X-IronPort-AV: E=McAfee;i="6000,8403,9780"; a="166510621" X-IronPort-AV: E=Sophos;i="5.77,399,1596524400"; d="scan'208";a="166510621" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2020 15:45:08 -0700 IronPort-SDR: /jyGz3XJTJUMIcNr568R6jz8E2RmUjdriAqplBBw4/c81mHQRRGbu7ot79QIw355FsyI65PfoT KXJkiSaQYoEQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,399,1596524400"; d="scan'208";a="533254645" Received: from dpdk51.sh.intel.com ([10.67.111.142]) by orsmga005.jf.intel.com with ESMTP; 20 Oct 2020 15:45:07 -0700 From: Qi Zhang To: qiming.yang@intel.com Cc: dev@dpdk.org, Qi Zhang , Tony Nguyen Date: Wed, 21 Oct 2020 06:48:37 +0800 Message-Id: <20201020224846.1592682-13-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20201020224846.1592682-1-qi.z.zhang@intel.com> References: <20201020224846.1592682-1-qi.z.zhang@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH 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; }