diff options
author | Siddharth Vadapalli <[email protected]> | 2023-04-03 14:33:21 +0530 |
---|---|---|
committer | Paolo Abeni <[email protected]> | 2023-04-04 12:30:28 +0200 |
commit | c6b486fb33680ad5a3a6390ce693c835caaae3f7 (patch) | |
tree | cbafe976782f4f4da0629d3fc615fae88f9eb99d /scripts/gdb/linux/tasks.py | |
parent | ea30388baebcce37fd594d425a65037ca35e59e8 (diff) |
net: ethernet: ti: am65-cpsw: Fix mdio cleanup in probe
In the am65_cpsw_nuss_probe() function's cleanup path, the call to
of_platform_device_destroy() for the common->mdio_dev device is invoked
unconditionally. It is possible that either the MDIO node is not present
in the device-tree, or the MDIO node is disabled in the device-tree. In
both these cases, the MDIO device is not created, resulting in a NULL
pointer dereference when the of_platform_device_destroy() function is
invoked on the common->mdio_dev device on the cleanup path.
Fix this by ensuring that the common->mdio_dev device exists, before
attempting to invoke of_platform_device_destroy().
Fixes: a45cfcc69a25 ("net: ethernet: ti: am65-cpsw-nuss: use of_platform_device_create() for mdio")
Signed-off-by: Siddharth Vadapalli <[email protected]>
Reviewed-by: Roger Quadros <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Paolo Abeni <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/tasks.py')
0 files changed, 0 insertions, 0 deletions