summaryrefslogtreecommitdiff
path: root/net/mac802154/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac802154/main.c')
-rw-r--r--net/mac802154/main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/mac802154/main.c b/net/mac802154/main.c
index 68b9667323ec..08cb32dc8fd3 100644
--- a/net/mac802154/main.c
+++ b/net/mac802154/main.c
@@ -167,13 +167,15 @@ int ieee802154_register_hw(struct ieee802154_hw *hw)
if (IS_ERR(dev)) {
rtnl_unlock();
rc = PTR_ERR(dev);
- goto out_wq;
+ goto out_phy;
}
rtnl_unlock();
return 0;
+out_phy:
+ wpan_phy_unregister(local->phy);
out_wq:
destroy_workqueue(local->workqueue);
out: