diff options
Diffstat (limited to 'net/core/ethtool.c')
-rw-r--r-- | net/core/ethtool.c | 5 |
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) | |||
2520 | static int ethtool_get_fecparam(struct net_device *dev, void __user *useraddr) | 2520 | static 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; |