forked from mirrors/linux
		
	staging: octeon-ethernet: 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
							
								
									d31a36b5f4
								
							
						
					
					
						commit
						284eb16068
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -421,7 +421,7 @@ int cvm_oct_common_init(struct net_device *dev)
 | 
				
			||||||
	if (priv->of_node)
 | 
						if (priv->of_node)
 | 
				
			||||||
		mac = of_get_mac_address(priv->of_node);
 | 
							mac = of_get_mac_address(priv->of_node);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (mac)
 | 
						if (!IS_ERR(mac))
 | 
				
			||||||
		ether_addr_copy(dev->dev_addr, mac);
 | 
							ether_addr_copy(dev->dev_addr, mac);
 | 
				
			||||||
	else
 | 
						else
 | 
				
			||||||
		eth_hw_addr_random(dev);
 | 
							eth_hw_addr_random(dev);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue