diff options
author | Ye Li <ye.li@nxp.com> | 2018-03-28 20:54:16 +0800 |
---|---|---|
committer | Joe Hershberger <joe.hershberger@ni.com> | 2018-04-13 15:47:39 -0500 |
commit | 2087eac25709071e5e4f32706db91a257160ef36 (patch) | |
tree | 2f10b78393d48e2e11ecbcf656b84c556deb694e /drivers/net | |
parent | 979e0fc86275fc09c85892aa2cd7987fa6f97a54 (diff) | |
download | u-boot-2087eac25709071e5e4f32706db91a257160ef36.tar.gz |
net: fec: Fix issue in DM probe timeout
Since the probe function has changed to reset FEC controller prior than
setup PHY. If reset FEC controller timeout, the priv->phydev is not
initialized, so can't free it.
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/fec_mxc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 4296550a6d..0076d6323e 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -1292,12 +1292,11 @@ static int fecmxc_probe(struct udevice *dev) return 0; -err_timeout: - free(priv->phydev); err_phy: mdio_unregister(bus); free(bus); err_mii: +err_timeout: fec_free_descs(priv); return ret; } |