mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-01 03:11:59 +00:00
net: axienet: Make missing MAC address non-fatal
Failing initialization on a missing MAC address property is excessive. We can just fall back to using a random MAC instead, which at least leaves the interface in a functioning state. Signed-off-by: Robert Hancock <hancock@sedsystems.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
7de44285c1
commit
d05a9ed5c3
1 changed files with 3 additions and 2 deletions
|
@ -1733,8 +1733,9 @@ static int axienet_probe(struct platform_device *pdev)
|
||||||
/* Retrieve the MAC address */
|
/* Retrieve the MAC address */
|
||||||
mac_addr = of_get_mac_address(pdev->dev.of_node);
|
mac_addr = of_get_mac_address(pdev->dev.of_node);
|
||||||
if (IS_ERR(mac_addr)) {
|
if (IS_ERR(mac_addr)) {
|
||||||
dev_err(&pdev->dev, "could not find MAC address\n");
|
dev_warn(&pdev->dev, "could not find MAC address property: %ld\n",
|
||||||
goto free_netdev;
|
PTR_ERR(mac_addr));
|
||||||
|
mac_addr = NULL;
|
||||||
}
|
}
|
||||||
axienet_set_mac_address(ndev, mac_addr);
|
axienet_set_mac_address(ndev, mac_addr);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue