Coverity reported this issue: Using uninitialized value mac when calling xsc_ethdev_mac_addr_add.
Coverity issue: 456592 Fixes: 0b0f9c161e ("net/xsc: initialize representors") Signed-off-by: Rong Qian <qi...@yunsilicon.com> Signed-off-by: Renyong Wan <wa...@yunsilicon.com> --- drivers/net/xsc/xsc_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/xsc/xsc_ethdev.c b/drivers/net/xsc/xsc_ethdev.c index 6102c158e8..988d734b5b 100644 --- a/drivers/net/xsc/xsc_ethdev.c +++ b/drivers/net/xsc/xsc_ethdev.c @@ -886,7 +886,7 @@ xsc_ethdev_init_one_representor(struct rte_eth_dev *eth_dev, void *init_params) struct xsc_repr_port *repr_port = (struct xsc_repr_port *)init_params; struct xsc_ethdev_priv *priv = TO_XSC_ETHDEV_PRIV(eth_dev); struct xsc_dev_config *config = &priv->config; - struct rte_ether_addr mac; + struct rte_ether_addr mac = priv->mac[0]; priv->repr_port = repr_port; repr_port->drv_data = eth_dev; -- 2.25.1