baseband/acc100: remove useless checks
authorNicolas Chautru <nicolas.chautru@intel.com>
Mon, 19 Oct 2020 21:09:57 +0000 (14:09 -0700)
committerAkhil Goyal <akhil.goyal@nxp.com>
Mon, 2 Nov 2020 08:24:40 +0000 (09:24 +0100)
Coverity reported dead code for a few error
checks which are indeed not reachable.

Coverity issue: 363451, 363454, 363455
Fixes: 5ad5060f8f7a ("baseband/acc100: add LDPC processing functions")
Fixes: f404dfe35cc3 ("baseband/acc100: support 4G processing")

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Reviewed-by: Tom Rix <trix@redhat.com>
drivers/baseband/acc100/rte_acc100_pmd.c

index 47ddbae..5e663a6 100644 (file)
@@ -2519,9 +2519,6 @@ enqueue_enc_one_op_tb(struct acc100_queue *q, struct rte_bbdev_enc_op *op,
                r++;
        }
 
-       if (unlikely(desc == NULL))
-               return current_enqueued_cbs;
-
 #ifdef RTE_LIBRTE_BBDEV_DEBUG
        if (check_mbuf_total_left(mbuf_total_left) != 0)
                return -EINVAL;
@@ -3076,9 +3073,6 @@ enqueue_ldpc_dec_one_op_tb(struct acc100_queue *q, struct rte_bbdev_dec_op *op,
                r++;
        }
 
-       if (unlikely(desc == NULL))
-               return current_enqueued_cbs;
-
 #ifdef RTE_LIBRTE_BBDEV_DEBUG
        if (check_mbuf_total_left(mbuf_total_left) != 0)
                return -EINVAL;
@@ -3181,9 +3175,6 @@ enqueue_dec_one_op_tb(struct acc100_queue *q, struct rte_bbdev_dec_op *op,
                r++;
        }
 
-       if (unlikely(desc == NULL))
-               return current_enqueued_cbs;
-
 #ifdef RTE_LIBRTE_BBDEV_DEBUG
        if (check_mbuf_total_left(mbuf_total_left) != 0)
                return -EINVAL;