net/bnxt: remove unnecessary variable assignment
authorKalesh AP <kalesh-anakkur.purayil@broadcom.com>
Thu, 10 Oct 2019 01:41:53 +0000 (18:41 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 23 Oct 2019 14:43:08 +0000 (16:43 +0200)
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 <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
drivers/net/bnxt/bnxt_rxq.c

index a46f968..e1ed360 100644 (file)
@@ -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);
        }