umber-kernel/drivers/net/mdio
Alok Tiwari b2b526c2cf net: mdio: Check regmap pointer returned by device_node_to_regmap()
The call to device_node_to_regmap() in airoha_mdio_probe() can return
an ERR_PTR() if regmap initialization fails. Currently, the driver
stores the pointer without validation, which could lead to a crash
if it is later dereferenced.

Add an IS_ERR() check and return the corresponding error code to make
the probe path more robust.

Fixes: 67e3ba9783 ("net: mdio: Add MDIO bus controller for Airoha AN7583")
Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20251031161607.58581-1-alok.a.tiwari@oracle.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-11-03 16:20:03 -08:00
..
Kconfig net: phy: move config symbol MDIO_BUS to drivers/net/phy/Kconfig 2025-09-23 16:56:27 -07:00
Makefile net: mdio: Add MDIO bus controller for Airoha AN7583 2025-06-27 10:09:36 +01:00
acpi_mdio.c
fwnode_mdio.c
mdio-airoha.c net: mdio: Check regmap pointer returned by device_node_to_regmap() 2025-11-03 16:20:03 -08:00
mdio-aspeed.c
mdio-bcm-iproc.c
mdio-bcm-unimac.c net: mdio: mdio-bcm-unimac: Refine incorrect clock message 2025-08-12 17:16:20 -07:00
mdio-bitbang.c
mdio-cavium.c
mdio-cavium.h
mdio-gpio.c
mdio-hisi-femac.c
mdio-i2c.c net: mdio: mdio-i2c: Hold the i2c bus lock during smbus transactions 2025-10-07 10:44:46 +02:00
mdio-ipq4019.c
mdio-ipq8064.c
mdio-moxart.c
mdio-mscc-miim.c
mdio-mux-bcm-iproc.c
mdio-mux-bcm6368.c
mdio-mux-gpio.c
mdio-mux-meson-g12a.c
mdio-mux-meson-gxl.c
mdio-mux-mmioreg.c
mdio-mux-multiplexer.c
mdio-mux.c
mdio-mvusb.c
mdio-octeon.c
mdio-realtek-rtl9300.c
mdio-regmap.c
mdio-sun4i.c
mdio-thunder.c
mdio-xgene.c
of_mdio.c of: mdio: warn if deprecated fixed-link binding is used 2025-09-15 18:15:41 -07:00