summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorPetr Štetiar <ynezz@true.cz>2019-05-03 16:27:12 +0200
committerDavid S. Miller <davem@davemloft.net>2019-05-06 06:47:07 +0200
commitd31a36b5f407d796d121af745730712337cd32a1 (patch)
treea3c34575135ffa786021c3cd823697a074f2683c /drivers
parentnet: usb: support of_get_mac_address new ERR_PTR error (diff)
downloadlinux-d31a36b5f407d796d121af745730712337cd32a1.tar.xz
linux-d31a36b5f407d796d121af745730712337cd32a1.zip
net: wireless: support of_get_mac_address new ERR_PTR error
There was NVMEM support added to of_get_mac_address, so it could now return ERR_PTR encoded error values, so we need to adjust all current users of of_get_mac_address to this new fact. Signed-off-by: Petr Štetiar <ynezz@true.cz> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath/ath9k/init.c2
-rw-r--r--drivers/net/wireless/mediatek/mt76/eeprom.c2
-rw-r--r--drivers/net/wireless/ralink/rt2x00/rt2x00dev.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index 98141b699c88..a04d8616fe09 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -642,7 +642,7 @@ static int ath9k_of_init(struct ath_softc *sc)
}
mac = of_get_mac_address(np);
- if (mac)
+ if (!IS_ERR(mac))
ether_addr_copy(common->macaddr, mac);
return 0;
diff --git a/drivers/net/wireless/mediatek/mt76/eeprom.c b/drivers/net/wireless/mediatek/mt76/eeprom.c
index a1529920d877..04964937a3af 100644
--- a/drivers/net/wireless/mediatek/mt76/eeprom.c
+++ b/drivers/net/wireless/mediatek/mt76/eeprom.c
@@ -94,7 +94,7 @@ mt76_eeprom_override(struct mt76_dev *dev)
return;
mac = of_get_mac_address(np);
- if (mac)
+ if (!IS_ERR(mac))
memcpy(dev->macaddr, mac, ETH_ALEN);
#endif
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
index bdc55d649a88..1b08b01db27b 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
@@ -1007,7 +1007,7 @@ void rt2x00lib_set_mac_address(struct rt2x00_dev *rt2x00dev, u8 *eeprom_mac_addr
const char *mac_addr;
mac_addr = of_get_mac_address(rt2x00dev->dev->of_node);
- if (mac_addr)
+ if (!IS_ERR(mac_addr))
ether_addr_copy(eeprom_mac_addr, mac_addr);
if (!is_valid_ether_addr(eeprom_mac_addr)) {