lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <20220913160427.12749-4-arun.ramadoss@microchip.com> Date: Tue, 13 Sep 2022 21:34:25 +0530 From: Arun Ramadoss <arun.ramadoss@...rochip.com> To: <linux-kernel@...r.kernel.org>, <netdev@...r.kernel.org> CC: <woojung.huh@...rochip.com>, <UNGLinuxDriver@...rochip.com>, <andrew@...n.ch>, <vivien.didelot@...il.com>, <f.fainelli@...il.com>, <olteanv@...il.com>, <davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>, <pabeni@...hat.com>, <linux@...linux.org.uk>, <Tristram.Ha@...rochip.com>, <arun.ramadoss@...rochip.com>, <prasanna.vengateshan@...rochip.com>, <hkallweit1@...il.com> Subject: [Patch net-next 3/5] 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@...rochip.com> --- drivers/net/dsa/microchip/lan937x_main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/dsa/microchip/lan937x_main.c b/drivers/net/dsa/microchip/lan937x_main.c index 1f4472c90a1f..36acef385de3 100644 --- a/drivers/net/dsa/microchip/lan937x_main.c +++ b/drivers/net/dsa/microchip/lan937x_main.c @@ -214,10 +214,8 @@ static int lan937x_mdio_register(struct ksz_device *dev) int ret; mdio_np = of_get_child_by_name(dev->dev->of_node, "mdio"); - if (!mdio_np) { - dev_err(ds->dev, "no MDIO bus node\n"); - return -ENODEV; - } + if (!mdio_np) + return 0; bus = devm_mdiobus_alloc(ds->dev); if (!bus) { -- 2.36.1
Powered by blists - more mailing lists