summaryrefslogtreecommitdiff
path: root/net/core/net-sysfs.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2022-03-15 10:28:12 +0100
committerIngo Molnar <mingo@kernel.org>2022-03-15 10:28:12 +0100
commitccdbf33c2349a0a867f46dde5f94b0715f6fa341 (patch)
tree87a4e147e484ed5ebd9e2b4defad7bdcd36b6b37 /net/core/net-sysfs.c
parentccacfe56d7ecdd2922256b87e9ea46f13bb03b55 (diff)
parent09688c0166e76ce2fb85e86b9d99be8b0084cdf9 (diff)
Merge tag 'v5.17-rc8' into sched/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'net/core/net-sysfs.c')
-rw-r--r--net/core/net-sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index 7ceb3460161b..9cbc1c8289bc 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -213,7 +213,7 @@ static ssize_t speed_show(struct device *dev,
if (!rtnl_trylock())
return restart_syscall();
- if (netif_running(netdev)) {
+ if (netif_running(netdev) && netif_device_present(netdev)) {
struct ethtool_link_ksettings cmd;
if (!__ethtool_get_link_ksettings(netdev, &cmd))