]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/ethtool/ioctl: remove if n_stats checks from ethtool_get_phy_stats
authorDaniil Tatianin <d-tatianin@yandex-team.ru>
Mon, 26 Dec 2022 11:48:24 +0000 (14:48 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Jan 2026 12:09:44 +0000 (13:09 +0100)
commitc8666be7c3381e606c1489be461e70a7cfd5f3ca
tree4fbf5e2e489f88c76a50aca52bdf32edc783f235
parent78f0d7353bdf1a15df62c739ae1655ced0b7fc57
net/ethtool/ioctl: remove if n_stats checks from ethtool_get_phy_stats

[ Upstream commit fd4778581d61d8848b532f8cdc9b325138748437 ]

Now that we always early return if we don't have any stats we can remove
these checks as they're no longer necessary.

Signed-off-by: Daniil Tatianin <d-tatianin@yandex-team.ru>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stable-dep-of: 7b07be1ff1cb ("ethtool: Avoid overflowing userspace buffer on stats query")
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/ethtool/ioctl.c