aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/ethtool.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-03-20 06:27:18 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-03-20 06:27:18 -0400
commit4958134df54c2c84e9c22ea042761d439164d26e (patch)
tree503177afab11f7d25b12a84ce25b481d305c51ba /net/core/ethtool.c
parentc4f528795d1add8b63652673f7262729f679c6c1 (diff)
parentc698ca5278934c0ae32297a8725ced2e27585d7f (diff)
Merge 4.16-rc6 into tty-next
We want the serial/tty fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/core/ethtool.c')
-rw-r--r--net/core/ethtool.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/core/ethtool.c b/net/core/ethtool.c
index 494e6a5d7306..3f89c76d5c24 100644
--- a/net/core/ethtool.c
+++ b/net/core/ethtool.c
@@ -2520,11 +2520,14 @@ static int set_phy_tunable(struct net_device *dev, void __user *useraddr)
2520static int ethtool_get_fecparam(struct net_device *dev, void __user *useraddr) 2520static int ethtool_get_fecparam(struct net_device *dev, void __user *useraddr)
2521{ 2521{
2522 struct ethtool_fecparam fecparam = { ETHTOOL_GFECPARAM }; 2522 struct ethtool_fecparam fecparam = { ETHTOOL_GFECPARAM };
2523 int rc;
2523 2524
2524 if (!dev->ethtool_ops->get_fecparam) 2525 if (!dev->ethtool_ops->get_fecparam)
2525 return -EOPNOTSUPP; 2526 return -EOPNOTSUPP;
2526 2527
2527 dev->ethtool_ops->get_fecparam(dev, &fecparam); 2528 rc = dev->ethtool_ops->get_fecparam(dev, &fecparam);
2529 if (rc)
2530 return rc;
2528 2531
2529 if (copy_to_user(useraddr, &fecparam, sizeof(fecparam))) 2532 if (copy_to_user(useraddr, &fecparam, sizeof(fecparam)))
2530 return -EFAULT; 2533 return -EFAULT;