net: ethernet: fec: fix fixed-link phydev leaks
authorJohan Hovold <johan@kernel.org>
Mon, 28 Nov 2016 18:25:00 +0000 (19:25 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 30 Nov 2016 04:17:02 +0000 (23:17 -0500)
commit82005b1c19b11998ea98532d742c021a19f948d7
tree9efd39043a5a4b768328b3c808431d1110e6f44d
parent140ca9d3471c424ab4c4036ab8d8d995f24a9c5b
net: ethernet: fec: fix fixed-link phydev leaks

Make sure to deregister and free any fixed-link PHY registered using
of_phy_register_fixed_link() on probe errors and on driver unbind.

Fixes: 407066f8f371 ("net: fec: Support phys probed from devicetree and
fixed-link")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fec_main.c