summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/ieee802154/nl-phy.c1
-rw-r--r--net/mac802154/iface.c1
2 files changed, 1 insertions, 1 deletions
diff --git a/net/ieee802154/nl-phy.c b/net/ieee802154/nl-phy.c
index 5d914d30e0b1..397ca126d9a2 100644
--- a/net/ieee802154/nl-phy.c
+++ b/net/ieee802154/nl-phy.c
@@ -226,6 +226,7 @@ int ieee802154_add_iface(struct sk_buff *skb, struct genl_info *info)
rc = PTR_ERR(dev);
goto nla_put_failure;
}
+ dev_hold(dev);
if (info->attrs[IEEE802154_ATTR_HW_ADDR]) {
struct sockaddr addr;
diff --git a/net/mac802154/iface.c b/net/mac802154/iface.c
index fced04b05275..78cb38124a2a 100644
--- a/net/mac802154/iface.c
+++ b/net/mac802154/iface.c
@@ -501,7 +501,6 @@ ieee802154_if_add(struct ieee802154_local *local, const char *name,
if (err)
goto err_free;
- dev_hold(dev); /* we return an incremented device refcount */
return dev;
err_free: