Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath/ath9k/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/mediatek/mt76/eeprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down