From: Vladimir Oltean Date: Mon, 7 Sep 2020 23:25:56 +0000 (+0300) Subject: net: dsa: don't print non-fatal MTU error if not supported X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=4349abdb409b04a5ed4ca4d2c1df7ef0cc16f6bd;p=linux.git 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 Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski --- diff --git a/net/dsa/slave.c b/net/dsa/slave.c index 27931141d30f2..4987f94a8f52c 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);