Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mdio_bus: Fix init if CONFIG_RESET_CONTROLLER=n

Commit 1d4639567d97 ("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: 1d4639567d97 ("mdio_bus: Fix PTR_ERR applied after initialization to constant")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: YueHaibing <yuehaibing@huawei.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Geert Uytterhoeven and committed by
Linus Torvalds
fd8f64df af42d346

+1 -1
+1 -1
drivers/net/phy/mdio_bus.c
··· 65 65 reset = devm_reset_control_get_exclusive(&mdiodev->dev, 66 66 "phy"); 67 67 if (IS_ERR(reset)) { 68 - if (PTR_ERR(reset) == -ENOENT || PTR_ERR(reset) == -ENOSYS) 68 + if (PTR_ERR(reset) == -ENOENT || PTR_ERR(reset) == -ENOTSUPP) 69 69 reset = NULL; 70 70 else 71 71 return PTR_ERR(reset);