Skip to content

Commit ef93244

Browse files
tititiou36gregkh
authored andcommitted
wcn36xx: Fix error handling path in 'wcn36xx_probe()'
[ Upstream commit a86308f ] 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: 5052de8 ("soc: qcom: smd: Transition client drivers from smd to rpmsg") Signed-off-by: Christophe JAILLET <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sasha Levin <[email protected]>
1 parent 2bc8b18 commit ef93244

File tree

1 file changed

+4
-2
lines changed
  • drivers/net/wireless/ath/wcn36xx

1 file changed

+4
-2
lines changed

drivers/net/wireless/ath/wcn36xx/main.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1341,15 +1341,15 @@ static int wcn36xx_probe(struct platform_device *pdev)
13411341
if (addr && ret != ETH_ALEN) {
13421342
wcn36xx_err("invalid local-mac-address\n");
13431343
ret = -EINVAL;
1344-
goto out_wq;
1344+
goto out_destroy_ept;
13451345
} else if (addr) {
13461346
wcn36xx_info("mac address: %pM\n", addr);
13471347
SET_IEEE80211_PERM_ADDR(wcn->hw, addr);
13481348
}
13491349

13501350
ret = wcn36xx_platform_get_resources(wcn, pdev);
13511351
if (ret)
1352-
goto out_wq;
1352+
goto out_destroy_ept;
13531353

13541354
wcn36xx_init_ieee80211(wcn);
13551355
ret = ieee80211_register_hw(wcn->hw);
@@ -1361,6 +1361,8 @@ static int wcn36xx_probe(struct platform_device *pdev)
13611361
out_unmap:
13621362
iounmap(wcn->ccu_base);
13631363
iounmap(wcn->dxe_base);
1364+
out_destroy_ept:
1365+
rpmsg_destroy_ept(wcn->smd_channel);
13641366
out_wq:
13651367
ieee80211_free_hw(hw);
13661368
out_err:

0 commit comments

Comments
 (0)