diff options
author | Vladimir Oltean <olteanv@gmail.com> | 2020-09-08 02:25:56 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-09-08 07:01:50 +0300 |
commit | 4349abdb409b04a5ed4ca4d2c1df7ef0cc16f6bd (patch) | |
tree | 1198d1cd64f099fd1528b83b6915217de78f2966 /net/dsa/slave.c | |
parent | c9ebf126f127780a5a125449e4efe6df37b8daa4 (diff) | |
download | linux-4349abdb409b04a5ed4ca4d2c1df7ef0cc16f6bd.tar.xz |
net: dsa: don't print non-fatal MTU error if not supported
Commit 72579e14a1d3 ("net: dsa: don't fail to probe if we couldn't set
the MTU") changed, for some reason, the "err && err != -EOPNOTSUPP"
check into a simple "err". This causes the MTU warning to be printed
even for drivers that don't have the MTU operations implemented.
Fix that.
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/dsa/slave.c')
-rw-r--r-- | net/dsa/slave.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dsa/slave.c b/net/dsa/slave.c index 27931141d30f..4987f94a8f52 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c @@ -1784,7 +1784,7 @@ int dsa_slave_create(struct dsa_port *port) rtnl_lock(); ret = dsa_slave_change_mtu(slave_dev, ETH_DATA_LEN); rtnl_unlock(); - if (ret) + if (ret && ret != -EOPNOTSUPP) dev_warn(ds->dev, "nonfatal error %d setting MTU on port %d\n", ret, port->index); |