]> git.baikalelectronics.ru Git - kernel.git/commit
mdio_bus: Fix init if CONFIG_RESET_CONTROLLER=n
authorGeert Uytterhoeven <geert+renesas@glider.be>
Tue, 19 Nov 2019 11:25:24 +0000 (12:25 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 19 Nov 2019 16:34:15 +0000 (08:34 -0800)
commit89637f4953cb735f8f11de39d6dfe95ee71fd51c
tree821691e666991a9f2aac2da71ee514effcfd5a41
parentd99b5c70ac649c93af0fa3c23d94a215913c930f
mdio_bus: Fix init if CONFIG_RESET_CONTROLLER=n

Commit 2af2bc80f8eb ("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: 2af2bc80f8eb ("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>
drivers/net/phy/mdio_bus.c