mt76: fix possible undetected invalid MAC address
authorShayne Chen <shayne.chen@mediatek.com>
Tue, 26 Nov 2019 13:15:54 +0000 (21:15 +0800)
committerFelix Fietkau <nbd@nbd.name>
Fri, 14 Feb 2020 09:06:00 +0000 (10:06 +0100)
commiteba571683b40eb1ad982c6ce9b92d15724bc220e
tree8f5f734e6f370341a6f730f304690ebafca225c1
parent37a68e001578ed1cd7def6a0666f60d2aade4f26
mt76: fix possible undetected invalid MAC address

Make sure the MAC address is checked before function returns.

If CONFIG_OF is set and the device node is null, the function will
return directly, and an invalid MAC address will not be checked.

Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/eeprom.c