]> git.baikalelectronics.ru Git - kernel.git/commit
net: phylink: propagate phy_attach_direct() return code
authorRussell King <rmk+kernel@armlinux.org.uk>
Thu, 12 Dec 2019 17:16:12 +0000 (17:16 +0000)
committerJakub Kicinski <jakub.kicinski@netronome.com>
Sun, 15 Dec 2019 04:18:57 +0000 (20:18 -0800)
commitb5b6f43789bdf7d37efe2188819bdcdfc265a782
tree6b526c4b95917ab3e25947d52b790e50713212ce
parentd2f28f1d42a27c903cc8333745a919438b8ae5e3
net: phylink: propagate phy_attach_direct() return code

of_phy_attach() hides the return value of phy_attach_direct(), forcing
us to return a "generic" ENODEV error code that is indistinguishable
from the lack-of-phy-property case.

Switch to using of_phy_find_device() to find the PHY device, and then
propagating any phy_attach_direct() error back to the caller.

Link: https://lore.kernel.org/lkml/20191210113829.GT25745@shell.armlinux.org.uk
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
drivers/net/phy/phylink.c