summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/ethtool/netlink.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/ethtool/netlink.c b/net/ethtool/netlink.c
index 767fb3f17267..f09c62302a9a 100644
--- a/net/ethtool/netlink.c
+++ b/net/ethtool/netlink.c
@@ -141,10 +141,9 @@ int ethnl_parse_header_dev_get(struct ethnl_req_info *req_info,
return -EINVAL;
}
- if (dev) {
- req_info->dev = dev;
+ req_info->dev = dev;
+ if (dev)
netdev_tracker_alloc(dev, &req_info->dev_tracker, GFP_KERNEL);
- }
req_info->flags = flags;
return 0;
}