Commit a86308fc authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Kalle Valo

wcn36xx: Fix error handling path in 'wcn36xx_probe()'

In case of error, 'qcom_wcnss_open_channel()' must be undone by a call to
'rpmsg_destroy_ept()', as already done in the remove function.

Fixes: 5052de8d ("soc: qcom: smd: Transition client drivers from smd to rpmsg")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200507043619.200051-1-christophe.jaillet@wanadoo.fr
parent d3ed0cf0
...@@ -1339,7 +1339,7 @@ static int wcn36xx_probe(struct platform_device *pdev) ...@@ -1339,7 +1339,7 @@ static int wcn36xx_probe(struct platform_device *pdev)
if (addr && ret != ETH_ALEN) { if (addr && ret != ETH_ALEN) {
wcn36xx_err("invalid local-mac-address\n"); wcn36xx_err("invalid local-mac-address\n");
ret = -EINVAL; ret = -EINVAL;
goto out_wq; goto out_destroy_ept;
} else if (addr) { } else if (addr) {
wcn36xx_info("mac address: %pM\n", addr); wcn36xx_info("mac address: %pM\n", addr);
SET_IEEE80211_PERM_ADDR(wcn->hw, addr); SET_IEEE80211_PERM_ADDR(wcn->hw, addr);
...@@ -1347,7 +1347,7 @@ static int wcn36xx_probe(struct platform_device *pdev) ...@@ -1347,7 +1347,7 @@ static int wcn36xx_probe(struct platform_device *pdev)
ret = wcn36xx_platform_get_resources(wcn, pdev); ret = wcn36xx_platform_get_resources(wcn, pdev);
if (ret) if (ret)
goto out_wq; goto out_destroy_ept;
wcn36xx_init_ieee80211(wcn); wcn36xx_init_ieee80211(wcn);
ret = ieee80211_register_hw(wcn->hw); ret = ieee80211_register_hw(wcn->hw);
...@@ -1359,6 +1359,8 @@ static int wcn36xx_probe(struct platform_device *pdev) ...@@ -1359,6 +1359,8 @@ static int wcn36xx_probe(struct platform_device *pdev)
out_unmap: out_unmap:
iounmap(wcn->ccu_base); iounmap(wcn->ccu_base);
iounmap(wcn->dxe_base); iounmap(wcn->dxe_base);
out_destroy_ept:
rpmsg_destroy_ept(wcn->smd_channel);
out_wq: out_wq:
ieee80211_free_hw(hw); ieee80211_free_hw(hw);
out_err: out_err:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment