net: ethernet: ti: davinci_emac: fix fixed-link phydev and of-node leaks
authorJohan Hovold <johan@kernel.org>
Mon, 28 Nov 2016 18:25:08 +0000 (19:25 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 30 Nov 2016 04:17:02 +0000 (23:17 -0500)
commit14cab6f6510c498c2fd55d4fd6063a91b477d2ff
treeca56ccbb9f3e290dccd565385aaef923ac7cf09a
parentc41a47678d067efe8c87e8f1cfdcb0147e58ee62
net: ethernet: ti: davinci_emac: fix fixed-link phydev and of-node 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.

Also remember to put the of-node reference on probe errors.

Fixes: 1bb6aa56bb38 ("net: davinci_emac: Add support for fixed-link
PHY")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/davinci_emac.c