common/qat: fix coverity issue

Message ID 20200506213107.26569-1-adamx.dybkowski@intel.com (mailing list archive)
State Accepted, archived
Delegated to: akhil goyal
Headers
Series common/qat: fix coverity issue |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-nxp-Performance success Performance Testing PASS
ci/travis-robot success Travis build: passed
ci/Intel-compilation success Compilation OK
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS

Commit Message

Dybkowski, AdamX May 6, 2020, 9:31 p.m. UTC
  This patch fixes Coverity issue #357770 by removing the non-essential
check for NULL pointer.

Fixes: c13cecf60f12 ("compress/qat: support IM buffer too small operation")

Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
---
 drivers/common/qat/qat_qp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Fiona Trahe May 7, 2020, 11:57 a.m. UTC | #1
> -----Original Message-----
> From: Dybkowski, AdamX <adamx.dybkowski@intel.com>
> Sent: Wednesday, May 6, 2020 10:31 PM
> To: dev@dpdk.org; Trahe, Fiona <fiona.trahe@intel.com>; akhil.goyal@nxp.com
> Cc: Dybkowski, AdamX <adamx.dybkowski@intel.com>
> Subject: [PATCH] common/qat: fix coverity issue
> 
> This patch fixes Coverity issue #357770 by removing the non-essential
> check for NULL pointer.
> 
> Fixes: c13cecf60f12 ("compress/qat: support IM buffer too small operation")
> 
> Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
  
Akhil Goyal May 9, 2020, 10:06 p.m. UTC | #2
> > This patch fixes Coverity issue #357770 by removing the non-essential
> > check for NULL pointer.
> >
> > Fixes: c13cecf60f12 ("compress/qat: support IM buffer too small operation")
> >
> > Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
> Acked-by: Fiona Trahe <fiona.trahe@intel.com>

The title should showcase the actual issue fixed and not the coverity issue

Changed the title as " common/qat: remove redundant check"

Applied to dpdk-next-crypto

Thanks.
  

Patch

diff --git a/drivers/common/qat/qat_qp.c b/drivers/common/qat/qat_qp.c
index 64dfd85c4..60ef8bf0f 100644
--- a/drivers/common/qat/qat_qp.c
+++ b/drivers/common/qat/qat_qp.c
@@ -864,7 +864,7 @@  qat_dequeue_op_burst(void *qp, void **ops, uint16_t nb_ops)
 
 		resp_msg = (uint8_t *)rx_queue->base_addr + head;
 
-		if (ops != NULL && nb_fw_responses) {
+		if (nb_fw_responses) {
 			/* only move on to next op if one was ready to return
 			 * to API
 			 */