Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Esben Haabendal <esben@geanix.com>
To: "Rosen Penev" <rosenp@gmail.com>
Cc: <netdev@vger.kernel.org>,  "Andrew Lunn" <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	 "Eric Dumazet" <edumazet@google.com>,
	 "Jakub Kicinski" <kuba@kernel.org>,
	 "Paolo Abeni" <pabeni@redhat.com>,
	 "Michal Simek" <michal.simek@amd.com>,
	<linux-arm-kernel@lists.infradead.org>,
	 <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net] net: ll_temac: Return actual error from of_get_mac_address()
Date: Thu, 27 Aug 2026 10:46:24 +0200	[thread overview]
Message-ID: <87ik4wymqn.fsf@geanix.com> (raw)
In-Reply-To: <20260827012439.162651-1-rosenp@gmail.com> (Rosen Penev's message of "Wed, 26 Aug 2026 18:24:39 -0700")

"Rosen Penev" <rosenp@gmail.com> writes:

> 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.
>
> 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>
> ---
>  drivers/net/ethernet/xilinx/ll_temac_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/xilinx/ll_temac_main.c b/drivers/net/ethernet/xilinx/ll_temac_main.c
> index 711ed9c2631b..81ec73e6e4c1 100644
> --- a/drivers/net/ethernet/xilinx/ll_temac_main.c
> +++ b/drivers/net/ethernet/xilinx/ll_temac_main.c
> @@ -1581,7 +1581,7 @@ static int temac_probe(struct platform_device *pdev)
>  		rc = of_get_mac_address(temac_np, addr);
>  		if (rc) {
>  			dev_err(&pdev->dev, "could not find MAC address\n");
> -			return -ENODEV;
> +			return rc;
>  		}
>  		temac_init_mac_address(ndev, addr);
>  	} else if (pdata) {
> --
> 2.55.0

Acked-by: Esben Haabendal <esben@geanix.com>


      parent reply	other threads:[~2026-08-27  8:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mWYTdXJIk1gD3_qHzfnWHAAyTs0Hh4I5P02_nisIqJdxRWM6DIMgOL9bIxaQqDTx37ldTpEm-0MsQQ3BWkTs9g==@protonmail.internalid>
2026-08-27  1:24 ` [PATCH net] net: ll_temac: Return actual error from of_get_mac_address() Rosen Penev
2026-08-27  1:39   ` Andrew Lunn
2026-08-27  8:46   ` Esben Haabendal [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ik4wymqn.fsf@geanix.com \
    --to=esben@geanix.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@amd.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rosenp@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox