aboutsummaryrefslogtreecommitdiffstats
path: root/net/ethtool/netlink.c
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@nvidia.com>2021-12-14 20:18:48 -0400
committerJason Gunthorpe <jgg@nvidia.com>2021-12-14 20:18:48 -0400
commit4922f0920966c28d674b03479cdcb7f3939bfbbd (patch)
tree6a8b3972ff853fc0addcfab662d33354124f7fdb /net/ethtool/netlink.c
parentRDMA/cma: Let cma_resolve_ib_dev() continue search even after empty entry (diff)
parentLinux 5.16-rc5 (diff)
downloadlinux-dev-4922f0920966c28d674b03479cdcb7f3939bfbbd.tar.xz
linux-dev-4922f0920966c28d674b03479cdcb7f3939bfbbd.zip
Merge tag 'v5.16-rc5' into rdma.git for-next
Required due to dependencies in following patches. Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'net/ethtool/netlink.c')
-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 38b44c0291b1..96f4180aabd2 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;
}