diff options
Diffstat (limited to 'net/mac802154/main.c')
-rw-r--r-- | net/mac802154/main.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/mac802154/main.c b/net/mac802154/main.c index 8500378c8318..08cb32dc8fd3 100644 --- a/net/mac802154/main.c +++ b/net/mac802154/main.c | |||
@@ -161,18 +161,21 @@ int ieee802154_register_hw(struct ieee802154_hw *hw) | |||
161 | 161 | ||
162 | rtnl_lock(); | 162 | rtnl_lock(); |
163 | 163 | ||
164 | dev = ieee802154_if_add(local, "wpan%d", NL802154_IFTYPE_NODE, | 164 | dev = ieee802154_if_add(local, "wpan%d", NET_NAME_ENUM, |
165 | NL802154_IFTYPE_NODE, | ||
165 | cpu_to_le64(0x0000000000000000ULL)); | 166 | cpu_to_le64(0x0000000000000000ULL)); |
166 | if (IS_ERR(dev)) { | 167 | if (IS_ERR(dev)) { |
167 | rtnl_unlock(); | 168 | rtnl_unlock(); |
168 | rc = PTR_ERR(dev); | 169 | rc = PTR_ERR(dev); |
169 | goto out_wq; | 170 | goto out_phy; |
170 | } | 171 | } |
171 | 172 | ||
172 | rtnl_unlock(); | 173 | rtnl_unlock(); |
173 | 174 | ||
174 | return 0; | 175 | return 0; |
175 | 176 | ||
177 | out_phy: | ||
178 | wpan_phy_unregister(local->phy); | ||
176 | out_wq: | 179 | out_wq: |
177 | destroy_workqueue(local->workqueue); | 180 | destroy_workqueue(local->workqueue); |
178 | out: | 181 | out: |