diff options
| author | Alok Tiwari <alok.a.tiwari@oracle.com> | 2025-10-31 09:15:53 -0700 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2025-11-03 16:20:03 -0800 |
| commit | b2b526c2cf57d14ee269e012ed179081871f45a1 (patch) | |
| tree | 256a1c2db4580301d670977c2679cabacb10c548 /scripts/lib/kdoc/kdoc_parser.py | |
| parent | d7d2fcf7ae31471b4e08b7e448b8fd0ec2e06a1b (diff) | |
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: 67e3ba978361 ("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>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_parser.py')
0 files changed, 0 insertions, 0 deletions
