mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jon Hunter <jonathanh@nvidia.com>
To: Daniel Golle <daniel@makrotopia.org>,
	Hans-Frieder Vogt <hfdevel@gmx.net>, Andrew Lunn <andrew@lunn.ch>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Christian Marangi <ansuelsmth@gmail.com>,
	Russell King <rmk+kernel@armlinux.org.uk>,
	Bartosz Golaszewski <bartosz.golaszewski@linaro.org>,
	Abhishek Chauhan <quic_abchauha@quicinc.com>,
	Robert Marko <robimarko@gmail.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>
Subject: Re: [PATCH net-next v2] net: phy: aquantia: fix return value check in aqr107_config_mdi()
Date: Tue, 15 Oct 2024 12:08:36 +0100	[thread overview]
Message-ID: <4aac8cd8-57ba-4757-af9d-9ac99ec8ef9b@nvidia.com> (raw)
In-Reply-To: <f8282e2fc6a5ac91fe91491edc7f1ca8f4a65a0d.1728825323.git.daniel@makrotopia.org>


On 13/10/2024 14:16, Daniel Golle wrote:
> of_property_read_u32() returns -EINVAL in case the property cannot be
> found rather than -ENOENT. Fix the check to not abort probing in case
> of the property being missing, and also in case CONFIG_OF is not set
> which will result in -ENOSYS.
> 
> Fixes: a2e1ba275eae ("net: phy: aquantia: allow forcing order of MDI pairs")
> Reported-by: Jon Hunter <jonathanh@nvidia.com>
> Closes: https://lore.kernel.org/all/114b4c03-5d16-42ed-945d-cf78eabea12b@nvidia.com/
> Suggested-by: Hans-Frieder Vogt <hfdevel@gmx.net>
> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> ---
>   drivers/net/phy/aquantia/aquantia_main.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/phy/aquantia/aquantia_main.c b/drivers/net/phy/aquantia/aquantia_main.c
> index 4fe757cd7dc7..7d27f080a343 100644
> --- a/drivers/net/phy/aquantia/aquantia_main.c
> +++ b/drivers/net/phy/aquantia/aquantia_main.c
> @@ -513,7 +513,7 @@ static int aqr107_config_mdi(struct phy_device *phydev)
>   	ret = of_property_read_u32(np, "marvell,mdi-cfg-order", &mdi_conf);
>   
>   	/* Do nothing in case property "marvell,mdi-cfg-order" is not present */
> -	if (ret == -ENOENT)
> +	if (ret == -EINVAL || ret == -ENOSYS)
>   		return 0;
>   
>   	if (ret)


Works for me!

Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>

Thanks
Jon

-- 
nvpublic

  reply	other threads:[~2024-10-15 11:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-13 13:16 Daniel Golle
2024-10-15 11:08 ` Jon Hunter [this message]
2024-10-15 17:00 ` patchwork-bot+netdevbpf

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=4aac8cd8-57ba-4757-af9d-9ac99ec8ef9b@nvidia.com \
    --to=jonathanh@nvidia.com \
    --cc=andrew@lunn.ch \
    --cc=ansuelsmth@gmail.com \
    --cc=bartosz.golaszewski@linaro.org \
    --cc=daniel@makrotopia.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hfdevel@gmx.net \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=quic_abchauha@quicinc.com \
    --cc=rmk+kernel@armlinux.org.uk \
    --cc=robimarko@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

all inboxes | Powered by JetHome®