[3/4] idpf: remvoee unnecessary null checks
Checks
Commit Message
The function rte_free() already handles NULL argument;
therefore the checks in this code are unnecessary.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/idpf/idpf_rxtx.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
@@ -251,8 +251,7 @@ reset_single_rx_queue(struct idpf_rx_queue *rxq)
rxq->rx_tail = 0;
rxq->nb_rx_hold = 0;
- if (rxq->pkt_first_seg != NULL)
- rte_pktmbuf_free(rxq->pkt_first_seg);
+ rte_pktmbuf_free(rxq->pkt_first_seg);
rxq->pkt_first_seg = NULL;
rxq->pkt_last_seg = NULL;