Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[cascardo/linux.git] / drivers / net / ethernet / mediatek / mtk_eth_soc.c
index a65801a..4cc50c0 100644 (file)
@@ -296,7 +296,9 @@ static int mtk_phy_connect(struct net_device *dev)
        regmap_write(eth->ethsys, ETHSYS_SYSCFG0, val);
 
        /* couple phydev to net_device */
-       mtk_phy_connect_node(eth, mac, np);
+       if (mtk_phy_connect_node(eth, mac, np))
+               goto err_phy;
+
        dev->phydev->autoneg = AUTONEG_ENABLE;
        dev->phydev->speed = 0;
        dev->phydev->duplex = 0;
@@ -317,7 +319,7 @@ static int mtk_phy_connect(struct net_device *dev)
 
 err_phy:
        of_node_put(np);
-       dev_err(eth->dev, "invalid phy_mode\n");
+       dev_err(eth->dev, "%s: invalid phy\n", __func__);
        return -EINVAL;
 }
 
@@ -2474,6 +2476,7 @@ const struct of_device_id of_mtk_match[] = {
        { .compatible = "mediatek,mt7623-eth" },
        {},
 };
+MODULE_DEVICE_TABLE(of, of_mtk_match);
 
 static struct platform_driver mtk_driver = {
        .probe = mtk_probe,