linux/drivers/net/ethernet/microchip
Horatiu Vultur 774d259749 net: sparx5: Fix reading of the MAC address
[ Upstream commit 588ab2dc25 ]

There is an issue with the checking of the return value of
'of_get_mac_address', which returns 0 on success and negative value on
failure. The driver interpretated the result the opposite way. Therefore
if there was a MAC address defined in the DT, then the driver was
generating a random MAC address otherwise it would use address 0.
Fix this by checking correctly the return value of 'of_get_mac_address'

Fixes: b74ef9f9cb ("net: sparx5: Do not use mac_addr uninitialized in mchp_sparx5_probe()")
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-01-12 11:59:14 +01:00
..
sparx5 net: sparx5: Fix reading of the MAC address 2023-01-12 11:59:14 +01:00
Kconfig
Makefile
enc28j60.c
enc28j60_hw.h
encx24j600-regmap.c net: encx24j600: Fix invalid logic in reading of MISTAT register 2022-12-14 11:37:25 +01:00
encx24j600.c
encx24j600_hw.h
lan743x_ethtool.c
lan743x_ethtool.h
lan743x_main.c
lan743x_main.h
lan743x_ptp.c
lan743x_ptp.h