diff options
author | Johan Hovold <johan@kernel.org> | 2016-11-30 15:29:55 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-12-02 10:42:47 -0500 |
commit | d2ed0a7755fe14c790f398ae55088d00492ef168 (patch) | |
tree | 38bf52c2e8c80c7ff2b09ebf6943734a9d01336e /drivers/net/ethernet/wiznet | |
parent | 661f049be17a3894cb438d46ba5af8e3643aac28 (diff) | |
download | lwn-d2ed0a7755fe14c790f398ae55088d00492ef168.tar.gz lwn-d2ed0a7755fe14c790f398ae55088d00492ef168.zip |
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: 277323814e49 ("stmmac: add fixed-link device-tree support")
Fixes: 4613b279bee7 ("ethernet: stmicro: stmmac: add missing of_node_put
after calling of_parse_phandle")
Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/wiznet')
0 files changed, 0 insertions, 0 deletions