diff options
author | Horatiu Vultur <horatiu.vultur@microchip.com> | 2023-01-02 15:12:15 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-01-02 16:39:14 +0300 |
commit | 588ab2dc25f60efeb516b4abedb6c551949cc185 (patch) | |
tree | 00117acd2715bcc4fa203cca03ef4d817b978ae4 /drivers/net/sb1000.c | |
parent | 06bf62944144a92d83dd14fd1378d2a288259561 (diff) | |
download | linux-588ab2dc25f60efeb516b4abedb6c551949cc185.tar.xz |
net: sparx5: Fix reading of the MAC address
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: b74ef9f9cb91 ("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>
Diffstat (limited to 'drivers/net/sb1000.c')
0 files changed, 0 insertions, 0 deletions