> -----Original Message----- > From: Stephen Hemminger <step...@networkplumber.org> > Sent: Monday, January 24, 2022 5:46 PM > To: dev@dpdk.org > Cc: Stephen Hemminger <step...@networkplumber.org>; Zhang, Roy Fan > <roy.fan.zh...@intel.com>; De Lara Guarch, Pablo > <pablo.de.lara.gua...@intel.com> > Subject: [PATCH v2 32/83] crypto/ipsec_mb: remove unnecessary NULL > checks > > Remove redundant NULL pointer checks before free functions > found by nullfree.cocci > > Signed-off-by: Stephen Hemminger <step...@networkplumber.org> > --- > drivers/crypto/ipsec_mb/ipsec_mb_ops.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/crypto/ipsec_mb/ipsec_mb_ops.c > b/drivers/crypto/ipsec_mb/ipsec_mb_ops.c > index 189262c4ad52..f808da9edf89 100644 > --- a/drivers/crypto/ipsec_mb/ipsec_mb_ops.c > +++ b/drivers/crypto/ipsec_mb/ipsec_mb_ops.c > @@ -102,8 +102,7 @@ ipsec_mb_qp_release(struct rte_cryptodev *dev, > uint16_t qp_id) > > if (qp != NULL && rte_eal_process_type() == RTE_PROC_PRIMARY) { > r = rte_ring_lookup(qp->name); > - if (r) > - rte_ring_free(r); > + rte_ring_free(r); > > #if IMB_VERSION(1, 1, 0) > IMB_VERSION_NUM > if (qp->mb_mgr) > @@ -291,8 +290,7 @@ ipsec_mb_qp_setup(struct rte_cryptodev *dev, > uint16_t qp_id, > if (qp->mb_mgr_mz) > rte_memzone_free(qp->mb_mgr_mz); > #endif > - if (qp) > - rte_free(qp); > + rte_free(qp); > return ret; > } > > -- > 2.30.2 Acked-by: Fan Zhang <roy.fan.zh...@intel.com>
- [PATCH v2 23/83] common/cpt: remove unnecessary NULL che... Stephen Hemminger
- [PATCH v2 24/83] common/dpaax: simplify kernel compat ma... Stephen Hemminger
- [PATCH v2 25/83] common/mlx5: remove unnecessary NULL ch... Stephen Hemminger
- [PATCH v2 26/83] common/qat: remove unnecessary NULL che... Stephen Hemminger
- [PATCH v2 27/83] compress/mlx5: remove unnecessary NULL ... Stephen Hemminger
- [PATCH v2 28/83] compress/octeontx: remove unnecessary N... Stephen Hemminger
- [PATCH v2 29/83] crypto/armv8: remove unnecessary NULL c... Stephen Hemminger
- [PATCH v2 30/83] crypto/ccp: remove unnecessary NULL che... Stephen Hemminger
- [PATCH v2 31/83] crypto/cnxk: remove unnecessary NULL ch... Stephen Hemminger
- [PATCH v2 32/83] crypto/ipsec_mb: remove unnecessary NUL... Stephen Hemminger
- RE: [PATCH v2 32/83] crypto/ipsec_mb: remove unnece... Zhang, Roy Fan
- [PATCH v2 33/83] crypto/mvsam: remove unnecessary NULL c... Stephen Hemminger
- [PATCH v2 34/83] crypto/null: remove unnecessary NULL ch... Stephen Hemminger
- [PATCH v2 35/83] crypto/octeontx: remove unnecessary NUL... Stephen Hemminger
- [PATCH v2 36/83] crypto/openssl: remove unnecessary NULL... Stephen Hemminger
- [PATCH v2 37/83] crypto/scheduler: remove unnecessary NU... Stephen Hemminger
- RE: [PATCH v2 37/83] crypto/scheduler: remove unnec... Zhang, Roy Fan
- [PATCH v2 38/83] crypto/virtio: remove unnecessary NULL ... Stephen Hemminger
- [PATCH v2 39/83] event/sw: remove unnecessary NULL check... Stephen Hemminger
- [PATCH v2 40/83] net/axgbe: remove unnecessary NULL chec... Stephen Hemminger
- [PATCH v2 41/83] net/bnx2x: remove unnecessary NULL chec... Stephen Hemminger