aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/marvell/octeon_ep/octep_tx.c
diff options
context:
space:
mode:
authorZiyang Xuan <william.xuanziyang@huawei.com>2022-05-13 15:29:28 +0800
committerDavid S. Miller <davem@davemloft.net>2022-05-16 11:40:04 +0100
commit1dee43c2c6f159c26684e02a56373bb3b537ab24 (patch)
tree2f5258bef0720104502c8a9b8f081e1afd5fdc63 /drivers/net/ethernet/marvell/octeon_ep/octep_tx.c
parentocteon_ep: add missing destroy_workqueue in octep_init_module (diff)
downloadlinux-dev-1dee43c2c6f159c26684e02a56373bb3b537ab24.tar.xz
linux-dev-1dee43c2c6f159c26684e02a56373bb3b537ab24.zip
octeon_ep: delete unnecessary NULL check
vfree(NULL) is safe. NULL check before vfree() is not needed. Delete them to simplify the code. Signed-off-by: Ziyang Xuan <william.xuanziyang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/ethernet/marvell/octeon_ep/octep_tx.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/marvell/octeon_ep/octep_tx.c b/drivers/net/ethernet/marvell/octeon_ep/octep_tx.c
index 511552bc3e87..5a520d37bea0 100644
--- a/drivers/net/ethernet/marvell/octeon_ep/octep_tx.c
+++ b/drivers/net/ethernet/marvell/octeon_ep/octep_tx.c
@@ -270,8 +270,7 @@ static void octep_free_iq(struct octep_iq *iq)
desc_ring_size = OCTEP_IQ_DESC_SIZE * CFG_GET_IQ_NUM_DESC(oct->conf);
- if (iq->buff_info)
- vfree(iq->buff_info);
+ vfree(iq->buff_info);
if (iq->desc_ring)
dma_free_coherent(iq->dev, desc_ring_size,