aboutsummaryrefslogtreecommitdiffstats
path: root/net/ieee802154
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2014-11-05 14:51:16 -0500
committerMarcel Holtmann <marcel@holtmann.org>2014-11-05 15:53:03 -0500
commit12cb56c2370b2911295026630a71af044c12d2aa (patch)
tree068e842eb808e8b4d6d0653165902c63db577d59 /net/ieee802154
parent986a8abfc51e66c96f9d39529a6ff0443fcd2591 (diff)
mac802154: move dev_hold out of ieee802154_if_add
This patch moves the dev_hold call inside of nl-phy ieee802154_add_iface function. The ieee802154_add_iface is the only one function which use the ieee802154_if_add function and contains the corresponding dev_put call. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/ieee802154')
-rw-r--r--net/ieee802154/nl-phy.c1
1 files changed, 1 insertions, 0 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)
226 rc = PTR_ERR(dev); 226 rc = PTR_ERR(dev);
227 goto nla_put_failure; 227 goto nla_put_failure;
228 } 228 }
229 dev_hold(dev);
229 230
230 if (info->attrs[IEEE802154_ATTR_HW_ADDR]) { 231 if (info->attrs[IEEE802154_ATTR_HW_ADDR]) {
231 struct sockaddr addr; 232 struct sockaddr addr;