]> git.baikalelectronics.ru Git - kernel.git/commit
net: ethernet: bcmgenet: fix fixed-link phydev leaks
authorJohan Hovold <johan@kernel.org>
Mon, 28 Nov 2016 18:24:59 +0000 (19:24 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 30 Nov 2016 04:17:02 +0000 (23:17 -0500)
commit9e4b30400c65cd460e42d949172c4cb1610164da
tree68a467c7cce871c24aa07d068898341812e520d0
parent72bbbf5b8974d1bcf34d05251af80a287cba1e1c
net: ethernet: bcmgenet: 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.

Note that we're still leaking any fixed-link PHY registered in the
non-OF probe path.

Fixes: 0b69d9b7b044 ("net: bcmgenet: use the new fixed PHY helpers")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/genet/bcmmii.c