LKML Archive on
 help / color / Atom feed
From: Geert Uytterhoeven <>
To: YueHaibing <>,
	"David S . Miller" <>,
	Andrew Lunn <>,
	Florian Fainelli <>,
	Heiner Kallweit <>
	Geert Uytterhoeven <>
Subject: [PATCH] mdio_bus: Fix init if CONFIG_RESET_CONTROLLER=n
Date: Tue, 19 Nov 2019 12:25:24 +0100
Message-ID: <> (raw)

Commit 1d4639567d970de0 ("mdio_bus: Fix PTR_ERR applied after
initialization to constant") accidentally changed a check from -ENOTSUPP
to -ENOSYS, causing failures if reset controller support is not enabled.
E.g. on r7s72100/rskrza1:

    sh-eth e8203000.ethernet: MDIO init failed: -524
    sh-eth: probe of e8203000.ethernet failed with error -524

Fixes: 1d4639567d970de0 ("mdio_bus: Fix PTR_ERR applied after initialization to constant")
Signed-off-by: Geert Uytterhoeven <>
This is a regression in v5.4-rc8.
Seen on r8a7740/armadillo, r7s72100/rskrza1, and r7s9210/rza2mevb.
 drivers/net/phy/mdio_bus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
index 35876562e32a02ce..dbacb00318775ff1 100644
--- a/drivers/net/phy/mdio_bus.c
+++ b/drivers/net/phy/mdio_bus.c
@@ -65,7 +65,7 @@ static int mdiobus_register_reset(struct mdio_device *mdiodev)
 		reset = devm_reset_control_get_exclusive(&mdiodev->dev,
 	if (IS_ERR(reset)) {
-		if (PTR_ERR(reset) == -ENOENT || PTR_ERR(reset) == -ENOSYS)
+		if (PTR_ERR(reset) == -ENOENT || PTR_ERR(reset) == -ENOTSUPP)
 			reset = NULL;
 			return PTR_ERR(reset);

             reply index

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-19 11:25 Geert Uytterhoeven [this message]
2019-11-19 18:05 ` Florian Fainelli
2019-11-19 18:55   ` Geert Uytterhoeven
2019-11-20  3:18     ` David Miller

Reply instructions:

You may reply publically 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:

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

  git send-email \ \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

LKML Archive on

Archives are clonable:
	git clone --mirror lkml/git/0.git
	git clone --mirror lkml/git/1.git
	git clone --mirror lkml/git/2.git
	git clone --mirror lkml/git/3.git
	git clone --mirror lkml/git/4.git
	git clone --mirror lkml/git/5.git
	git clone --mirror lkml/git/6.git
	git clone --mirror lkml/git/7.git
	git clone --mirror lkml/git/8.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ \
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone