]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: microchip: lan937x: return zero if mdio node not present
authorArun Ramadoss <arun.ramadoss@microchip.com>
Thu, 22 Sep 2022 07:10:25 +0000 (12:40 +0530)
committerJakub Kicinski <kuba@kernel.org>
Mon, 26 Sep 2022 19:41:07 +0000 (12:41 -0700)
commitead49e1a4c89d27bde9011de80cac117bcfc0282
tree783fbcfdb6805736e2dfbac1f604c20c8d1472fa
parentf3d5ae3b0c2072258d0f4667596d113ac3941bbf
net: dsa: microchip: lan937x: return zero if mdio node not present

Currently, if the mdio node is not present in the dts file then
lan937x_mdio_register return -ENODEV and entire probing process fails.
To make the mdio_register generic for all ksz series switches and to
maintain back-compatibility with existing dts file, return -ENODEV is
replaced with return 0.

Signed-off-by: Arun Ramadoss <arun.ramadoss@microchip.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/microchip/lan937x_main.c