mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	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>
This commit is contained in:
		
							parent
							
								
									adfb3cb2c5
								
							
						
					
					
						commit
						d31a36b5f4
					
				
					 3 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
					@ -642,7 +642,7 @@ static int ath9k_of_init(struct ath_softc *sc)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	mac = of_get_mac_address(np);
 | 
						mac = of_get_mac_address(np);
 | 
				
			||||||
	if (mac)
 | 
						if (!IS_ERR(mac))
 | 
				
			||||||
		ether_addr_copy(common->macaddr, mac);
 | 
							ether_addr_copy(common->macaddr, mac);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -94,7 +94,7 @@ mt76_eeprom_override(struct mt76_dev *dev)
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	mac = of_get_mac_address(np);
 | 
						mac = of_get_mac_address(np);
 | 
				
			||||||
	if (mac)
 | 
						if (!IS_ERR(mac))
 | 
				
			||||||
		memcpy(dev->macaddr, mac, ETH_ALEN);
 | 
							memcpy(dev->macaddr, mac, ETH_ALEN);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1007,7 +1007,7 @@ void rt2x00lib_set_mac_address(struct rt2x00_dev *rt2x00dev, u8 *eeprom_mac_addr
 | 
				
			||||||
	const char *mac_addr;
 | 
						const char *mac_addr;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	mac_addr = of_get_mac_address(rt2x00dev->dev->of_node);
 | 
						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);
 | 
							ether_addr_copy(eeprom_mac_addr, mac_addr);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!is_valid_ether_addr(eeprom_mac_addr)) {
 | 
						if (!is_valid_ether_addr(eeprom_mac_addr)) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue