Remove redundant NULL pointer checks before free functions found by nullfree.cocci
Signed-off-by: Stephen Hemminger <step...@networkplumber.org> --- drivers/net/netvsc/hn_rxtx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c index 50ca1710ef3e..3e3488f1b87a 100644 --- a/drivers/net/netvsc/hn_rxtx.c +++ b/drivers/net/netvsc/hn_rxtx.c @@ -315,8 +315,7 @@ hn_dev_tx_queue_setup(struct rte_eth_dev *dev, } error: - if (txq->txdesc_pool) - rte_mempool_free(txq->txdesc_pool); + rte_mempool_free(txq->txdesc_pool); rte_memzone_free(txq->tx_rndis_mz); rte_free(txq); return err; @@ -365,8 +364,7 @@ hn_dev_tx_queue_release(struct rte_eth_dev *dev, uint16_t qid) if (!txq) return; - if (txq->txdesc_pool) - rte_mempool_free(txq->txdesc_pool); + rte_mempool_free(txq->txdesc_pool); rte_memzone_free(txq->tx_rndis_mz); rte_free(txq); -- 2.30.2