summaryrefslogtreecommitdiffstats
path: root/net/ethtool
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-12-09 21:04:19 +0100
committerJakub Kicinski <kuba@kernel.org>2021-12-09 22:23:02 +0100
commit3150a73366b64e3109f0facbc98bcacbc14e81ba (patch)
tree2b94b32c5fe97a4e76058a6f65e8c5717b53ee16 /net/ethtool
parentskbuff: Extract list pointers to silence compiler warnings (diff)
parentMerge tag 'net-5.16-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/net... (diff)
downloadlinux-3150a73366b64e3109f0facbc98bcacbc14e81ba.tar.xz
linux-3150a73366b64e3109f0facbc98bcacbc14e81ba.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
No conflicts. Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ethtool')
-rw-r--r--net/ethtool/netlink.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ethtool/netlink.c b/net/ethtool/netlink.c
index eaa50af074be..23f32a995099 100644
--- a/net/ethtool/netlink.c
+++ b/net/ethtool/netlink.c
@@ -40,7 +40,8 @@ int ethnl_ops_begin(struct net_device *dev)
if (dev->dev.parent)
pm_runtime_get_sync(dev->dev.parent);
- if (!netif_device_present(dev)) {
+ if (!netif_device_present(dev) ||
+ dev->reg_state == NETREG_UNREGISTERING) {
ret = -ENODEV;
goto err;
}