mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 15:11:48 -04:00
net: ethernet: dm9000: Handle -EPROBE_DEFER in dm9000_parse_dt()
[ Upstream commit 9a6a0dea16177ccaecc116f560232e63bec115f1 ] The call to of_get_mac_address() can return -EPROBE_DEFER, for instance when the MAC address is read from a NVMEM driver that did not probe yet. Cc: H. Nikolaus Schaller <hns@goldelico.com> Cc: Mathieu Malaterre <malat@debian.org> Signed-off-by: Paul Cercueil <paul@crapouillou.net> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
05e26a842a
commit
1b1939fedc
1 changed files with 2 additions and 0 deletions
|
|
@ -1405,6 +1405,8 @@ static struct dm9000_plat_data *dm9000_parse_dt(struct device *dev)
|
|||
mac_addr = of_get_mac_address(np);
|
||||
if (!IS_ERR(mac_addr))
|
||||
ether_addr_copy(pdata->dev_addr, mac_addr);
|
||||
else if (PTR_ERR(mac_addr) == -EPROBE_DEFER)
|
||||
return ERR_CAST(mac_addr);
|
||||
|
||||
return pdata;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue