mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 10:09:10 +02:00
wifi: mt76: fix of_get_mac_address error handling
Check return value instead of is_valid_ether_addr. The latter is handled by the former. Signed-off-by: Rosen Penev <rosenp@gmail.com> Acked-by: Lorenzo Bianconi <lorenzo@kernel.org> Link: https://patch.msgid.link/20260427051746.954704-1-rosenp@gmail.com Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
9629f31f50
commit
31ee158271
|
|
@ -181,7 +181,7 @@ mt76_eeprom_override(struct mt76_phy *phy)
|
|||
if (err == -EPROBE_DEFER)
|
||||
return err;
|
||||
|
||||
if (!is_valid_ether_addr(phy->macaddr)) {
|
||||
if (err) {
|
||||
eth_random_addr(phy->macaddr);
|
||||
dev_info(dev->dev,
|
||||
"Invalid MAC address, using random address %pM\n",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user