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:
|
||
|---|---|---|
| .. | ||
| Kconfig | ||
| Makefile | ||
| acpi_mdio.c | ||
| fwnode_mdio.c | ||
| mdio-airoha.c | ||
| mdio-aspeed.c | ||
| mdio-bcm-iproc.c | ||
| mdio-bcm-unimac.c | ||
| mdio-bitbang.c | ||
| mdio-cavium.c | ||
| mdio-cavium.h | ||
| mdio-gpio.c | ||
| mdio-hisi-femac.c | ||
| mdio-i2c.c | ||
| 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 | ||