enetc: Drop redundant device node check
authorClaudiu Manoil <claudiu.manoil@nxp.com>
Tue, 10 Mar 2020 12:51:21 +0000 (14:51 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 10 Mar 2020 22:48:54 +0000 (15:48 -0700)
The existence of the DT port node is the first thing checked
at probe time, and probing won't reach this point if the node
is missing.

Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/enetc/enetc_pf.c

index 545a344..4e4a491 100644 (file)
@@ -797,11 +797,6 @@ static int enetc_of_get_phy(struct enetc_ndev_priv *priv)
        struct device_node *mdio_np;
        int err;
 
-       if (!np) {
-               dev_err(priv->dev, "missing ENETC port node\n");
-               return -ENODEV;
-       }
-
        priv->phy_node = of_parse_phandle(np, "phy-handle", 0);
        if (!priv->phy_node) {
                if (!of_phy_is_fixed_link(np)) {