]> git.baikalelectronics.ru Git - kernel.git/commit
net: stmmac: dwmac-oxnas: fix fixed-link-phydev leaks
authorJohan Hovold <johan@kernel.org>
Mon, 2 Jan 2017 11:56:03 +0000 (12:56 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 3 Jan 2017 14:33:00 +0000 (09:33 -0500)
commit6fddd8398b318743326a32fa631c03167c0803b7
treea64dcbda44d0f500956c1df4236a73ecbd9d4f8f
parentdb92801f680ece761c597f31276c8a01b1eb642f
net: stmmac: dwmac-oxnas: fix 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 calling the new glue
helper function.

For driver unbind, use the generic stmmac-platform remove implementation
and add an exit callback to disable the clock.

Fixes: aee639b7d520 ("net: stmmac: Add OXNAS Glue Driver")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/dwmac-oxnas.c