net/mlx5e: Fix failing ethtool query on FEC query error
authorShay Agroskin <shayag@mellanox.com>
Thu, 8 Nov 2018 12:23:36 +0000 (14:23 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Mon, 19 Nov 2018 23:33:31 +0000 (15:33 -0800)
If FEC caps query fails when executing 'ethtool <interface>'
the whole callback fails unnecessarily, fixed that by replacing the
error return code with debug logging only.

Fixes: 6cfa94605091 ("net/mlx5e: Ethtool driver callback for query/set FEC policy")
Signed-off-by: Shay Agroskin <shayag@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c

index 3e770abfd80212d70e3b7952fa05ba57ae1490e1..25c1c4f96841244336c3257abbd213707655ad51 100644 (file)
@@ -843,8 +843,7 @@ static int mlx5e_get_link_ksettings(struct net_device *netdev,
        ethtool_link_ksettings_add_link_mode(link_ksettings, supported,
                                             Autoneg);
 
-       err = get_fec_supported_advertised(mdev, link_ksettings);
-       if (err)
+       if (get_fec_supported_advertised(mdev, link_ksettings))
                netdev_dbg(netdev, "%s: FEC caps query failed: %d\n",
                           __func__, err);