diff options
author | Rosen Penev <rosenp@gmail.com> | 2024-11-05 00:01:27 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-11-07 04:54:47 +0300 |
commit | 2575897640328d218e4451d2c6f2741ae894ed27 (patch) | |
tree | 04c915d52176edca66b210437e97afe768782393 /drivers/net/ethernet/freescale | |
parent | 85d05befbbfc949e7ebb4ac52023f18ad3fe693f (diff) | |
download | linux-2575897640328d218e4451d2c6f2741ae894ed27.tar.xz |
net: ucc_geth: fix usage with NVMEM MAC address
When nvmem is not ready, of_get_ethdev_address returns -EPROBE_DEFER. In
such a case, return -EPROBE_DEFER to avoid not having a proper MAC
address.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://patch.msgid.link/20241104210127.307420-5-rosenp@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/freescale')
-rw-r--r-- | drivers/net/ethernet/freescale/ucc_geth.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/drivers/net/ethernet/freescale/ucc_geth.c index acadebb7dd34..6663c1768089 100644 --- a/drivers/net/ethernet/freescale/ucc_geth.c +++ b/drivers/net/ethernet/freescale/ucc_geth.c @@ -3732,7 +3732,9 @@ static int ucc_geth_probe(struct platform_device* ofdev) goto err_deregister_fixed_link; } - of_get_ethdev_address(np, dev); + err = of_get_ethdev_address(np, dev); + if (err == -EPROBE_DEFER) + goto err_deregister_fixed_link; ugeth->ug_info = ug_info; ugeth->dev = device; |