* [PATCHv3 net] net: ll_temac: Return actual error from of_get_mac_address()
@ 2026-09-03 21:32 Rosen Penev
2026-09-09 0:00 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Rosen Penev @ 2026-09-03 21:32 UTC (permalink / raw)
To: netdev
Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Michal Simek, Esben Haabendal,
moderated list:ARM/ZYNQ ARCHITECTURE, open list
When of_get_mac_address() fails, return the actual error code (rc)
instead of the hardcoded -ENODEV. This preserves the original error
information, which may be more specific (e.g., -EINVAL, -EPROBE_DEFER)
and helps callers handle the failure appropriately.
Use dev_err_probe() to avoid printing an extra error message in case of
-EPROBE_DEFER.
Fixes: 8425c41d1ef7 ("net: ll_temac: Extend support to non-device-tree platforms")
Assisted-by: opencode:big-pickle
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
v3: actually use dev_err_probe()
v2: use dev_err_probe()
drivers/net/ethernet/xilinx/ll_temac_main.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/xilinx/ll_temac_main.c b/drivers/net/ethernet/xilinx/ll_temac_main.c
index 711ed9c2631b..ea0f54e4df27 100644
--- a/drivers/net/ethernet/xilinx/ll_temac_main.c
+++ b/drivers/net/ethernet/xilinx/ll_temac_main.c
@@ -1579,10 +1579,8 @@ static int temac_probe(struct platform_device *pdev)
if (temac_np) {
/* Retrieve the MAC address */
rc = of_get_mac_address(temac_np, addr);
- if (rc) {
- dev_err(&pdev->dev, "could not find MAC address\n");
- return -ENODEV;
- }
+ if (rc)
+ return dev_err_probe(&pdev->dev, rc, "could not find MAC address\n");
temac_init_mac_address(ndev, addr);
} else if (pdata) {
temac_init_mac_address(ndev, pdata->mac_addr);
--
2.55.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCHv3 net] net: ll_temac: Return actual error from of_get_mac_address()
2026-09-03 21:32 [PATCHv3 net] net: ll_temac: Return actual error from of_get_mac_address() Rosen Penev
@ 2026-09-09 0:00 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-09-09 0:00 UTC (permalink / raw)
To: Rosen Penev
Cc: netdev, andrew+netdev, davem, edumazet, kuba, pabeni,
michal.simek, esben, linux-arm-kernel, linux-kernel
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 3 Sep 2026 14:32:41 -0700 you wrote:
> When of_get_mac_address() fails, return the actual error code (rc)
> instead of the hardcoded -ENODEV. This preserves the original error
> information, which may be more specific (e.g., -EINVAL, -EPROBE_DEFER)
> and helps callers handle the failure appropriately.
>
> Use dev_err_probe() to avoid printing an extra error message in case of
> -EPROBE_DEFER.
>
> [...]
Here is the summary with links:
- [PATCHv3,net] net: ll_temac: Return actual error from of_get_mac_address()
https://git.kernel.org/netdev/net-next/c/3d80284b244e
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-09 0:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-03 21:32 [PATCHv3 net] net: ll_temac: Return actual error from of_get_mac_address() Rosen Penev
2026-09-09 0:00 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®