From: YueHaibing Date: Wed, 19 May 2021 02:10:38 +0000 (+0800) Subject: ethtool: stats: Fix a copy-paste error X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=c71b99640d2d350ee3146452c1057bd59cb2c5e0;p=linux.git ethtool: stats: Fix a copy-paste error data->ctrl_stats should be memset with correct size. Fixes: bfad2b979ddc ("ethtool: add interface to read standard MAC Ctrl stats") Signed-off-by: YueHaibing Acked-by: Jakub Kicinski Signed-off-by: David S. Miller --- diff --git a/net/ethtool/stats.c b/net/ethtool/stats.c index b7642dc96d507..ec07f5765e030 100644 --- a/net/ethtool/stats.c +++ b/net/ethtool/stats.c @@ -119,7 +119,7 @@ static int stats_prepare_data(const struct ethnl_req_info *req_base, */ memset(&data->phy_stats, 0xff, sizeof(data->phy_stats)); memset(&data->mac_stats, 0xff, sizeof(data->mac_stats)); - memset(&data->ctrl_stats, 0xff, sizeof(data->mac_stats)); + memset(&data->ctrl_stats, 0xff, sizeof(data->ctrl_stats)); memset(&data->rmon_stats, 0xff, sizeof(data->rmon_stats)); if (test_bit(ETHTOOL_STATS_ETH_PHY, req_info->stat_mask) &&