]> git.droids-corp.org - dpdk.git/commitdiff
eventdev/crypto: remove useless check
authorGanapati Kundapura <ganapati.kundapura@intel.com>
Wed, 23 Feb 2022 07:34:43 +0000 (01:34 -0600)
committerJerin Jacob <jerinj@marvell.com>
Thu, 24 Feb 2022 05:23:15 +0000 (06:23 +0100)
eca_cryptodev_cdev_flush() is internal function and called with
valid range of cdevs.

crypto_cdev_info structure is allocated at adapter creation time
and retrieved from the adapter for a valid cdevs which cannot be NULL
and hence no need for NULL check.

Fixes: 2ae84b39ae7b ("eventdev/crypto: store operations in circular buffer")
Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
lib/eventdev/rte_event_crypto_adapter.c

index 0b484f36952bd5d050ea4a538f08d77211181bfa..f624f501873b0fb5e5169a929a30147856f19103 100644 (file)
@@ -529,10 +529,8 @@ eca_crypto_cdev_flush(struct event_crypto_adapter *adapter,
        uint16_t qp;
 
        curr_dev = &adapter->cdevs[cdev_id];
-       if (unlikely(curr_dev == NULL))
-               return 0;
-
        dev = rte_cryptodev_pmd_get_dev(cdev_id);
+
        for (qp = 0; qp < dev->data->nb_queue_pairs; qp++) {
 
                curr_queue = &curr_dev->qpairs[qp];