diff options
author | Horatiu Vultur <horatiu.vultur@microchip.com> | 2023-01-02 13:12:15 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-01-02 13:39:14 +0000 |
commit | 588ab2dc25f60efeb516b4abedb6c551949cc185 (patch) | |
tree | 00117acd2715bcc4fa203cca03ef4d817b978ae4 /tools/testing/selftests/bpf/prog_tests/prog_array_init.c | |
parent | 06bf62944144a92d83dd14fd1378d2a288259561 (diff) |
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 'tools/testing/selftests/bpf/prog_tests/prog_array_init.c')
0 files changed, 0 insertions, 0 deletions