From: Ye Li Date: Wed, 28 Mar 2018 12:54:16 +0000 (+0800) Subject: net: fec: Fix issue in DM probe timeout X-Git-Tag: v2018.05-rc2~10^2~14 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2087eac25709071e5e4f32706db91a257160ef36;p=u-boot 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 Acked-by: Joe Hershberger --- 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; }