Skip to content
Commit d2ed0a77 authored by Johan Hovold's avatar Johan Hovold Committed by David S. Miller
Browse files

net: ethernet: stmmac: fix of-node and fixed-link-phydev leaks



Make sure to deregister and free any fixed-link phy registered during
probe on probe errors and on driver unbind by adding a new glue helper
function.

Drop the of-node reference taken in the same path also on late probe
errors (and not just on driver unbind) by moving the put from
stmmac_dvr_remove() to the new helper.

Fixes: 27732381 ("stmmac: add fixed-link device-tree support")
Fixes: 4613b279 ("ethernet: stmicro: stmmac: add missing of_node_put
after calling of_parse_phandle")
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
Acked-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 661f049b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment