]> git.dujemihanovic.xyz Git - u-boot.git/commit
net: fec: Only unregister MII bus if we registered it
authorSean Anderson <sean.anderson@seco.com>
Thu, 15 Apr 2021 17:06:09 +0000 (13:06 -0400)
committerStefano Babic <sbabic@denx.de>
Sun, 2 May 2021 10:46:54 +0000 (12:46 +0200)
commitcd4359194ba5e3bb8706b3d4051ea967bf978595
tree5d0438f67f019cb5ae361be5a0cec5cb9805b132
parenteccd132974f1f66247e72bbf3fd2bab71ab7d10e
net: fec: Only unregister MII bus if we registered it

If we fail to probe for whatever reason, we cannot unregister/free the
MII bus unless we registered it with fec_get_miibus. This fixes FECs
sharing an MDIO bus from destroying it, preventing the other FEC from
using it.

Fixes: 6a895d039b ("net: Update eQos driver and FEC driver to use eth phy interfaces")
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
drivers/net/fec_mxc.c