]> git.sur5r.net Git - u-boot/commitdiff
net: fec: Fix issue in DM probe timeout
authorYe Li <ye.li@nxp.com>
Wed, 28 Mar 2018 12:54:16 +0000 (20:54 +0800)
committerJoe Hershberger <joe.hershberger@ni.com>
Fri, 13 Apr 2018 20:47:39 +0000 (15:47 -0500)
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>
drivers/net/fec_mxc.c

index 4296550a6d7beae1228c2395d9c660092b00734a..0076d6323e44d67f69913ae4866c6f25184b047e 100644 (file)
@@ -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;
 }