mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 09:20:13 -04: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:
committed by
Felix Fietkau
parent
9629f31f50
commit
31ee158271
@@ -181,7 +181,7 @@ mt76_eeprom_override(struct mt76_phy *phy)
|
|||||||
if (err == -EPROBE_DEFER)
|
if (err == -EPROBE_DEFER)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
if (!is_valid_ether_addr(phy->macaddr)) {
|
if (err) {
|
||||||
eth_random_addr(phy->macaddr);
|
eth_random_addr(phy->macaddr);
|
||||||
dev_info(dev->dev,
|
dev_info(dev->dev,
|
||||||
"Invalid MAC address, using random address %pM\n",
|
"Invalid MAC address, using random address %pM\n",
|
||||||
|
|||||||
Reference in New Issue
Block a user