summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2026-09-03 14:32:41 -0700
committerJakub Kicinski <kuba@kernel.org>2026-09-08 16:57:50 -0700
commit3d80284b244ed2992feb98d9f937accff6fc33a8 (patch)
tree0173fd1a346d79673182d6985acf5e2548bf0410
parente2573085497807b551324de20d368127602151ae (diff)
downloadlinux-next-3d80284b244ed2992feb98d9f937accff6fc33a8.tar.gz
linux-next-3d80284b244ed2992feb98d9f937accff6fc33a8.zip
net: ll_temac: Return actual error from of_get_mac_address()
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. Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://patch.msgid.link/20260903213241.1040204-1-rosenp@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r--drivers/net/ethernet/xilinx/ll_temac_main.c7
1 files changed, 3 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..303b4da66399 100644
--- a/drivers/net/ethernet/xilinx/ll_temac_main.c
+++ b/drivers/net/ethernet/xilinx/ll_temac_main.c
@@ -1579,10 +1579,9 @@ 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);