You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
net: mdiobus: fix double put fwnode in the error path
If phy_device_register() or fwnode_mdiobus_phy_device_register()
fail, phy_device_free() is called, the device refcount is decreased
to 0, then fwnode_handle_put() will be called in phy_device_release(),
but in the error path, fwnode_handle_put() has already been called,
so set fwnode to NULL after fwnode_handle_put() in the error path to
avoid double put.
Fixes: cdde156 ("net: mdiobus: fix unbalanced node reference count")
Reported-by: Zeng Heng <[email protected]>
Tested-by: Zeng Heng <[email protected]>
Signed-off-by: Yang Yingliang <[email protected]>
Reviewed-by: Zeng Heng <[email protected]>
Tested-by: Zeng Heng <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
0 commit comments