diff options
author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2021-05-24 12:25:25 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-06-03 10:00:38 +0300 |
commit | 4a368bc25ab60a8e87d450327037fa743c88a545 (patch) | |
tree | b3d1a66ba022ddb6dc253be55cfe38f8d4cae03b /drivers/net/dsa/sja1105 | |
parent | 4ef506c0718b0fdc1d0a6dfac1682cc85fdaabf1 (diff) | |
download | linux-4a368bc25ab60a8e87d450327037fa743c88a545.tar.xz |
net: dsa: sja1105: error out on unsupported PHY mode
commit 6729188d2646709941903052e4b78e1d82c239b9 upstream.
The driver continues probing when a port is configured for an
unsupported PHY interface type, instead it should stop.
Fixes: 8aa9ebccae87 ("net: dsa: Introduce driver for NXP SJA1105 5-port L2 switch")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/dsa/sja1105')
-rw-r--r-- | drivers/net/dsa/sja1105/sja1105_main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/dsa/sja1105/sja1105_main.c b/drivers/net/dsa/sja1105/sja1105_main.c index 2f2a5c2cdb42..7cae3705c6f4 100644 --- a/drivers/net/dsa/sja1105/sja1105_main.c +++ b/drivers/net/dsa/sja1105/sja1105_main.c @@ -206,6 +206,7 @@ static int sja1105_init_mii_settings(struct sja1105_private *priv, default: dev_err(dev, "Unsupported PHY mode %s!\n", phy_modes(ports[i].phy_mode)); + return -EINVAL; } /* Even though the SerDes port is able to drive SGMII autoneg |