diff options
author | Paul Cercueil <paul@crapouillou.net> | 2020-02-16 22:39:43 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-02-17 07:01:43 +0300 |
commit | 9a6a0dea16177ccaecc116f560232e63bec115f1 (patch) | |
tree | 145fb9f87bdb07da52cdd6bb365430d5d97e0eec /drivers/net | |
parent | d2f273f0a9205257b91af1d3d461ee29688c2f24 (diff) | |
download | linux-9a6a0dea16177ccaecc116f560232e63bec115f1.tar.xz |
net: ethernet: dm9000: Handle -EPROBE_DEFER in dm9000_parse_dt()
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>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/davicom/dm9000.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/davicom/dm9000.c b/drivers/net/ethernet/davicom/dm9000.c index 1ea3372775e6..e94ae9b94dbf 100644 --- a/drivers/net/ethernet/davicom/dm9000.c +++ b/drivers/net/ethernet/davicom/dm9000.c @@ -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; } |