]> git.baikalelectronics.ru Git - kernel.git/commit
net/ethtool/ioctl: return -EOPNOTSUPP if we have no phy stats
authorDaniil Tatianin <d-tatianin@yandex-team.ru>
Mon, 26 Dec 2022 11:48:23 +0000 (14:48 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Jan 2023 06:17:58 +0000 (07:17 +0100)
commite38b53909beeaf135f180a6c4837e041de9a02ef
tree8b1c3a47685980ebf16fdff1fc1bf0eceec97600
parentbe835d39c31605673d88dc376c0b5fc73eaad9b5
net/ethtool/ioctl: return -EOPNOTSUPP if we have no phy stats

[ Upstream commit 15ef9a7def34f14b307c973d3df64eaaf708c3d1 ]

It's not very useful to copy back an empty ethtool_stats struct and
return 0 if we didn't actually have any stats. This also allows for
further simplification of this function in the future commits.

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/core/ethtool.c