* [PATCH] mdio_bus: revert inadvertent error code change
@ 2019-11-22 9:17 Helmut Grohne
2019-11-22 17:31 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Helmut Grohne @ 2019-11-22 9:17 UTC (permalink / raw)
To: YueHaibing, davem, andrew, f.fainelli, hkallweit1; +Cc: linux-kernel, netdev
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@intenta.de>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mdio_bus: revert inadvertent error code change
2019-11-22 9:17 [PATCH] mdio_bus: revert inadvertent error code change Helmut Grohne
@ 2019-11-22 17:31 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-11-22 17:31 UTC (permalink / raw)
To: helmut.grohne
Cc: yuehaibing, andrew, f.fainelli, hkallweit1, linux-kernel, netdev
From: Helmut Grohne <helmut.grohne@intenta.de>
Date: Fri, 22 Nov 2019 10:17:13 +0100
> 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@intenta.de>
You should always generate networking bug fixes against the networking
GIT tree, which had you done you would have seen that this bug is
fixed there already.
Thank you.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-11-22 17:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-22 9:17 [PATCH] mdio_bus: revert inadvertent error code change Helmut Grohne
2019-11-22 17:31 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).