Skip to content

Commit 6e4ff1c

Browse files
geertudavem330
authored andcommitted
mdio_bus: Fix init if CONFIG_RESET_CONTROLLER=n
Commit 1d46395 ("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 Seen on r8a7740/armadillo, r7s72100/rskrza1, and r7s9210/rza2mevb. Fixes: 1d46395 ("mdio_bus: Fix PTR_ERR applied after initialization to constant") Signed-off-by: Geert Uytterhoeven <[email protected]> Cc: YueHaibing <[email protected]> Cc: David S. Miller <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 2c61e82 commit 6e4ff1c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/phy/mdio_bus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ static int mdiobus_register_reset(struct mdio_device *mdiodev)
6565
reset = devm_reset_control_get_exclusive(&mdiodev->dev,
6666
"phy");
6767
if (IS_ERR(reset)) {
68-
if (PTR_ERR(reset) == -ENOENT || PTR_ERR(reset) == -ENOSYS)
68+
if (PTR_ERR(reset) == -ENOENT || PTR_ERR(reset) == -ENOTSUPP)
6969
reset = NULL;
7070
else
7171
return PTR_ERR(reset);

0 commit comments

Comments
 (0)