From ee8a0ac9aac95436c9b8cc72d6e3f09349149a77 Mon Sep 17 00:00:00 2001 From: Tian Xin Date: Tue, 23 Jul 2024 11:51:07 +0800 Subject: [PATCH] drivers: Fix compile warning "argument used uninitialized" yunsilicon inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IAERZJ CVE: NA ------------------------------------------ Fix compile warning "argument used uninitialized" Fixes: 5b8a867a26e7 ("drivers: support Yunsilicon's MS and MV series NICs") Reviewed-by: Weihonggang Signed-off-by: Tian Xin --- drivers/net/ethernet/yunsilicon/xsc/net/xsc_dcbnl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/yunsilicon/xsc/net/xsc_dcbnl.c b/drivers/net/ethernet/yunsilicon/xsc/net/xsc_dcbnl.c index d61fdedf8ca6..effa0150b14a 100644 --- a/drivers/net/ethernet/yunsilicon/xsc/net/xsc_dcbnl.c +++ b/drivers/net/ethernet/yunsilicon/xsc/net/xsc_dcbnl.c @@ -322,7 +322,7 @@ static int xsc_dcbnl_ieee_setpfc(struct net_device *dev, { struct xsc_adapter *priv = netdev_priv(dev); u32 changed = 0; - u8 curr_pfc_en; + u8 curr_pfc_en = 0; int ret = 0; #ifndef XSC_DCBX_STUB struct xsc_core_device *xdev = priv->xdev; @@ -919,7 +919,7 @@ static int xsc_dcbnl_getbuffer(struct net_device *dev, struct xsc_adapter *priv = netdev_priv(dev); struct xsc_core_device *xdev = priv->xdev; struct xsc_port_buffer port_buffer = {0}; - u8 buffer[XSC_MAX_PRIORITY]; + u8 buffer[XSC_MAX_PRIORITY] = {0}; int i; #ifndef XSC_DCBX_STUB int err = 0; -- Gitee