提交 2b4d413c 编写于 作者: A Alexander Aring 提交者: Marcel Holtmann

mac802154: fix ieee802154_register_hw error handling

Currently if ieee802154_if_add failed, we don't unregister the wpan phy
which was registered before. This patch adds a correct error handling
for unregister the wpan phy when ieee802154_if_add failed.
Signed-off-by: NAlexander Aring <alex.aring@gmail.com>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 d24d8144
......@@ -166,13 +166,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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册