aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mscc
diff options
context:
space:
mode:
authorHoratiu Vultur <horatiu.vultur@microchip.com>2019-11-15 11:11:15 +0100
committerDavid S. Miller <davem@davemloft.net>2019-11-16 13:01:34 -0800
commit4214fa1efffd4c6236231f1104eddc156b4e9104 (patch)
tree0967d7a72fe501546f6624e689ab9ad616336441 /drivers/net/ethernet/mscc
parentnet: core: allow fast GRO for skbs with Ethernet header in head (diff)
downloadlinux-dev-4214fa1efffd4c6236231f1104eddc156b4e9104.tar.xz
linux-dev-4214fa1efffd4c6236231f1104eddc156b4e9104.zip
net: mscc: ocelot: omit error check from of_get_phy_mode
The commit 0c65b2b90d13c ("net: of_get_phy_mode: Change API to solve int/unit warnings") updated the function of_get_phy_mode declaration. Now it returns an error code and in case the node doesn't contain the property 'phy-mode' or 'phy-connection-type' it returns -EINVAL and would set the phy_interface_t to PHY_INTERFACE_MODE_NA. Ocelot VSC7514 has 4 internal phys which have the phy interface PHY_INTERFACE_MODE_NA. So because of_get_phy_mode would assign PHY_INTERFACE_MODE_NA to phy_mode when there is an error, there is no need to add the error check. Updates for v2: - drop error check because of_get_phy_mode already assigns phy_interface to PHY_INTERFACE_MODE in case of error. Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mscc')
-rw-r--r--drivers/net/ethernet/mscc/ocelot_board.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/mscc/ocelot_board.c b/drivers/net/ethernet/mscc/ocelot_board.c
index 5581b3b0165c..5541ec26f953 100644
--- a/drivers/net/ethernet/mscc/ocelot_board.c
+++ b/drivers/net/ethernet/mscc/ocelot_board.c
@@ -451,9 +451,7 @@ static int mscc_ocelot_probe(struct platform_device *pdev)
priv = container_of(ocelot_port, struct ocelot_port_private,
port);
- err = of_get_phy_mode(portnp, &phy_mode);
- if (err && err != -ENODEV)
- goto out_put_ports;
+ of_get_phy_mode(portnp, &phy_mode);
priv->phy_mode = phy_mode;