This is a note to let you know that I've just added the patch titled net: ethernet: mtk_eth_soc: fix error checking in mtk_mac_config() to the 5.16-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: net-ethernet-mtk_eth_soc-fix-error-checking-in-mtk_mac_config.patch and it can be found in the queue-5.16 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 214b3369ab9b0a6f28d6c970220c209417edbc65 Mon Sep 17 00:00:00 2001 From: Tom Rix <trix@xxxxxxxxxx> Date: Sat, 15 Jan 2022 09:49:18 -0800 Subject: net: ethernet: mtk_eth_soc: fix error checking in mtk_mac_config() From: Tom Rix <trix@xxxxxxxxxx> commit 214b3369ab9b0a6f28d6c970220c209417edbc65 upstream. Clang static analysis reports this problem mtk_eth_soc.c:394:7: warning: Branch condition evaluates to a garbage value if (err) ^~~ err is not initialized and only conditionally set. So intitialize err. Fixes: 7e538372694b ("net: ethernet: mediatek: Re-add support SGMII") Signed-off-by: Tom Rix <trix@xxxxxxxxxx> Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c @@ -224,7 +224,7 @@ static void mtk_mac_config(struct phylin phylink_config); struct mtk_eth *eth = mac->hw; u32 mcr_cur, mcr_new, sid, i; - int val, ge_mode, err; + int val, ge_mode, err = 0; /* MT76x8 has no hardware settings between for the MAC */ if (!MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628) && Patches currently in stable-queue which might be from trix@xxxxxxxxxx are queue-5.16/iio-chemical-sunrise_co2-set-val-parameter-only-on-s.patch queue-5.16/i3c-master-dw-check-return-of-dw_i3c_master_get_free.patch queue-5.16/net-mscc-ocelot-fix-using-match-before-it-is-set.patch queue-5.16/net-ethernet-mtk_eth_soc-fix-error-checking-in-mtk_mac_config.patch