diff mbox series

[28/82] crypto/armv8: remove unnecessary NULL checks

Message ID 20220124000518.319850-29-stephen@networkplumber.org (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers show
Series remove unnecessary null checks | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Stephen Hemminger Jan. 24, 2022, 12:04 a.m. UTC
Remove redundant NULL pointer checks before free functions
found by nullfree.cocci

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/crypto/armv8/rte_armv8_pmd_ops.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Ruifeng Wang Jan. 24, 2022, 4:15 a.m. UTC | #1
> -----Original Message-----
> From: Stephen Hemminger <stephen@networkplumber.org>
> Sent: Monday, January 24, 2022 8:04 AM
> To: dev@dpdk.org
> Cc: Stephen Hemminger <stephen@networkplumber.org>; Ruifeng Wang
> <Ruifeng.Wang@arm.com>
> Subject: [PATCH 28/82] crypto/armv8: remove unnecessary NULL checks
> 
> Remove redundant NULL pointer checks before free functions found by
> nullfree.cocci
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
>  drivers/crypto/armv8/rte_armv8_pmd_ops.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 

Thanks.
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
diff mbox series

Patch

diff --git a/drivers/crypto/armv8/rte_armv8_pmd_ops.c b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
index 1b2749fe62c6..c07ac0489e57 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd_ops.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
@@ -251,8 +251,7 @@  armv8_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return 0;
 
 qp_setup_cleanup:
-	if (qp)
-		rte_free(qp);
+	rte_free(qp);
 
 	return -1;
 }