]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
net: ethernet: ti: cpsw: fix of_node and phydev leaks
authorJohan Hovold <johan@kernel.org>
Thu, 17 Nov 2016 16:40:01 +0000 (17:40 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 18 Nov 2016 18:48:53 +0000 (13:48 -0500)
commit8cbcc466fd4abd38a14b9d9b76c63a2cb7006554
tree68075bfa1f37f62b88fe4482c043889c21d38535
parenta4e32b0d0a26ba2f2ba1c65bd403d06ccc1df29c
net: ethernet: ti: cpsw: fix of_node and phydev leaks

Make sure to drop references taken and deregister devices registered
during probe on probe errors (including deferred probe) and driver
unbind.

Specifically, PHY of-node references were never released and fixed-link
PHY devices were never deregistered.

Fixes: 9e42f715264f ("drivers: net: cpsw: add phy-handle parsing")
Fixes: 1f71e8c96fc6 ("drivers: net: cpsw: 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/cpsw.c