Commit 7d2bd999 authored by Daniil Tatianin's avatar Daniil Tatianin Committed by sanglipeng
Browse files

net/ethtool/ioctl: return -EOPNOTSUPP if we have no phy stats

stable inclusion
from stable-v5.10.165
commit 0040e48492f375a63ab68df35be4d228e64b41c8
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7T7G4

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=0040e48492f375a63ab68df35be4d228e64b41c8



--------------------------------

[ Upstream commit 9deb1e9f ]

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: default avatarDaniil Tatianin <d-tatianin@yandex-team.ru>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 4510735a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment