summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2022-11-17 16:29:05 +0100
committerDavid S. Miller <davem@davemloft.net>2022-11-21 11:06:47 +0100
commit62a45b384a2833fbdff4658a56dab38e9d6f4580 (patch)
tree4fb8a6dcb2cda13ede817140dfd187e08196138d /drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c
parentnet: ethernet: mtk_eth_soc: fix RSTCTRL_PPE{0,1} definitions (diff)
downloadlinux-62a45b384a2833fbdff4658a56dab38e9d6f4580.tar.xz
linux-62a45b384a2833fbdff4658a56dab38e9d6f4580.zip
net: microchip: sparx5: prevent uninitialized variable
Smatch complains that: drivers/net/ethernet/microchip/sparx5/sparx5_dcb.c:112 sparx5_dcb_apptrust_validate() error: uninitialized symbol 'match'. This would only happen if the: if (sparx5_dcb_apptrust_policies[i].nselectors != nselectors) condition is always true (they are not equal). The "nselectors" variable comes from dcbnl_ieee_set() and it is a number between 0-256. This seems like a probably a real bug. Fixes: 23f8382cd95d ("net: microchip: sparx5: add support for apptrust") Signed-off-by: Dan Carpenter <error27@gmail.com> Reviewed-by: Daniel Machon <daniel.machon@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c')
0 files changed, 0 insertions, 0 deletions