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 E43B1A3160 for ; Thu, 10 Oct 2019 03:43:45 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CCC491E92F; Thu, 10 Oct 2019 03:42:34 +0200 (CEST) Received: from rnd-relay.smtp.broadcom.com (rnd-relay.smtp.broadcom.com [192.19.229.170]) by dpdk.org (Postfix) with ESMTP id 1DCED1E4E0; Thu, 10 Oct 2019 03:42:02 +0200 (CEST) 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 7F9A230C11B; Wed, 9 Oct 2019 18:40:27 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com 7F9A230C11B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1570671627; bh=m2MnydcQ9XZ4fiiRK53sqBiCl1MYNqiGPrzcMPsoCiU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NDjyCryp1Xc05UceqG/GlZlLHpaJiLrZFYvuRSgFqeUeKv7JZDQXFLAVtwbx6l0kR RRRxo92x/FIppNAfZwjQ+Io2XeQ4elwSGnUPvwQgh5b+EDuLDhgIK+BhTL2KE+xbkQ Ps3lR1TAuzF8HPmQCdvrVlrJkYMh1fixsxZTGsjc= Received: from localhost.localdomain (unknown [10.230.30.225]) by mail-irv-17.broadcom.com (Postfix) with ESMTP id C2FFB14008D; Wed, 9 Oct 2019 18:41:59 -0700 (PDT) From: Ajit Khaparde To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Kalesh AP , stable@dpdk.org, Santoshkumar Karanappa Rastapur Date: Wed, 9 Oct 2019 18:41:53 -0700 Message-Id: <20191010014153.64908-13-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: <20191010014153.64908-1-ajit.khaparde@broadcom.com> References: <167a2652-7ad6-e02a-8a02-01f828bcba8c@intel.com> <20191010014153.64908-1-ajit.khaparde@broadcom.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 12/12] net/bnxt: remove unnecessary variable assignment 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 There is no need to assign return value to a temporary variable. Instead return error directly in case of failure. Fixes: 1fe427fd08ee ("net/bnxt: support enable/disable interrupt") Cc: stable@dpdk.org Signed-off-by: Kalesh AP Reviewed-by: Santoshkumar Karanappa Rastapur Reviewed-by: Ajit Khaparde Signed-off-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_rxq.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c index a46f96827c..e1ed360eff 100644 --- a/drivers/net/bnxt/bnxt_rxq.c +++ b/drivers/net/bnxt/bnxt_rxq.c @@ -384,10 +384,9 @@ bnxt_rx_queue_intr_enable_op(struct rte_eth_dev *eth_dev, uint16_t queue_id) if (eth_dev->data->rx_queues) { rxq = eth_dev->data->rx_queues[queue_id]; - if (!rxq) { - rc = -EINVAL; - return rc; - } + if (!rxq) + return -EINVAL; + cpr = rxq->cp_ring; B_CP_DB_REARM(cpr, cpr->cp_raw_cons); } @@ -408,10 +407,9 @@ bnxt_rx_queue_intr_disable_op(struct rte_eth_dev *eth_dev, uint16_t queue_id) if (eth_dev->data->rx_queues) { rxq = eth_dev->data->rx_queues[queue_id]; - if (!rxq) { - rc = -EINVAL; - return rc; - } + if (!rxq) + return -EINVAL; + cpr = rxq->cp_ring; B_CP_DB_DISARM(cpr); } -- 2.20.1 (Apple Git-117)