aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ark/ark_ethdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ark/ark_ethdev.c')
-rw-r--r--drivers/net/ark/ark_ethdev.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c
index 552ca01a..4f52e2bd 100644
--- a/drivers/net/ark/ark_ethdev.c
+++ b/drivers/net/ark/ark_ethdev.c
@@ -313,6 +313,9 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
/* We are a single function multi-port device. */
ret = ark_config_device(dev);
+ if (ret)
+ return -1;
+
dev->dev_ops = &ark_eth_dev_ops;
dev->data->mac_addrs = rte_zmalloc("ark", ETHER_ADDR_LEN, 0);
@@ -506,7 +509,6 @@ eth_ark_dev_uninit(struct rte_eth_dev *dev)
dev->dev_ops = NULL;
dev->rx_pkt_burst = NULL;
dev->tx_pkt_burst = NULL;
- rte_free(dev->data->mac_addrs);
return 0;
}