[PATCH] mdio_bus: revert inadvertent error code change

From: Helmut Grohne
Date: Fri Nov 22 2019 - 04:23:03 EST


The fixed commit inadvertently changes the error code from ENOTSUPP to
ENOSYS. Doing so breaks (among other things) probing of macb, which
returns -ENOTSUPP as it is now returned from mdiobus_register_reset.

Fixes: 1d4639567d97 ("mdio_bus: Fix PTR_ERR applied after initialization to constant")
Signed-off-by: Helmut Grohne <helmut.grohne@xxxxxxxxxx>
---
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 35876562e32a..dbacb0031877 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,
"phy");
if (IS_ERR(reset)) {
- if (PTR_ERR(reset) == -ENOENT || PTR_ERR(reset) == -ENOSYS)
+ if (PTR_ERR(reset) == -ENOENT || PTR_ERR(reset) == -ENOTSUPP)
reset = NULL;
else
return PTR_ERR(reset);
--
2.20.1