* [PATCH] wcn36xx: Fix error handling path in 'wcn36xx_probe()'
@ 2020-05-07 4:36 ` Christophe JAILLET
0 siblings, 0 replies; 10+ messages in thread
From: Christophe JAILLET @ 2020-05-07 4:36 UTC (permalink / raw)
To: kvalo, davem, bjorn.andersson, marcel, andy.gross
Cc: wcn36xx, linux-wireless, netdev, linux-kernel, kernel-janitors,
Christophe JAILLET
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: 5052de8deff5 ("soc: qcom: smd: Transition client drivers from smd to rpmsg")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
Not 100% sure of the commit for Fixes, but it is consistent with the
analysis in efad8396e906 where the same call has been added in the remove
function.
---
drivers/net/wireless/ath/wcn36xx/main.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c
index e49c306e0eef..1acdc13a74fc 100644
--- a/drivers/net/wireless/ath/wcn36xx/main.c
+++ b/drivers/net/wireless/ath/wcn36xx/main.c
@@ -1339,7 +1339,7 @@ static int wcn36xx_probe(struct platform_device *pdev)
if (addr && ret != ETH_ALEN) {
wcn36xx_err("invalid local-mac-address\n");
ret = -EINVAL;
- goto out_wq;
+ goto out_channel;
} else if (addr) {
wcn36xx_info("mac address: %pM\n", addr);
SET_IEEE80211_PERM_ADDR(wcn->hw, addr);
@@ -1347,7 +1347,7 @@ static int wcn36xx_probe(struct platform_device *pdev)
ret = wcn36xx_platform_get_resources(wcn, pdev);
if (ret)
- goto out_wq;
+ goto out_channel;
wcn36xx_init_ieee80211(wcn);
ret = ieee80211_register_hw(wcn->hw);
@@ -1359,6 +1359,8 @@ static int wcn36xx_probe(struct platform_device *pdev)
out_unmap:
iounmap(wcn->ccu_base);
iounmap(wcn->dxe_base);
+out_channel:
+ rpmsg_destroy_ept(wcn->smd_channel);
out_wq:
ieee80211_free_hw(hw);
out_err:
--
2.25.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH] wcn36xx: Fix error handling path in 'wcn36xx_probe()'
@ 2020-05-07 4:36 ` Christophe JAILLET
0 siblings, 0 replies; 10+ messages in thread
From: Christophe JAILLET @ 2020-05-07 4:36 UTC (permalink / raw)
To: kvalo, davem, bjorn.andersson, marcel, andy.gross
Cc: wcn36xx, linux-wireless, netdev, linux-kernel, kernel-janitors,
Christophe JAILLET
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: 5052de8deff5 ("soc: qcom: smd: Transition client drivers from smd to rpmsg")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
Not 100% sure of the commit for Fixes, but it is consistent with the
analysis in efad8396e906 where the same call has been added in the remove
function.
---
drivers/net/wireless/ath/wcn36xx/main.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c
index e49c306e0eef..1acdc13a74fc 100644
--- a/drivers/net/wireless/ath/wcn36xx/main.c
+++ b/drivers/net/wireless/ath/wcn36xx/main.c
@@ -1339,7 +1339,7 @@ static int wcn36xx_probe(struct platform_device *pdev)
if (addr && ret != ETH_ALEN) {
wcn36xx_err("invalid local-mac-address\n");
ret = -EINVAL;
- goto out_wq;
+ goto out_channel;
} else if (addr) {
wcn36xx_info("mac address: %pM\n", addr);
SET_IEEE80211_PERM_ADDR(wcn->hw, addr);
@@ -1347,7 +1347,7 @@ static int wcn36xx_probe(struct platform_device *pdev)
ret = wcn36xx_platform_get_resources(wcn, pdev);
if (ret)
- goto out_wq;
+ goto out_channel;
wcn36xx_init_ieee80211(wcn);
ret = ieee80211_register_hw(wcn->hw);
@@ -1359,6 +1359,8 @@ static int wcn36xx_probe(struct platform_device *pdev)
out_unmap:
iounmap(wcn->ccu_base);
iounmap(wcn->dxe_base);
+out_channel:
+ rpmsg_destroy_ept(wcn->smd_channel);
out_wq:
ieee80211_free_hw(hw);
out_err:
--
2.25.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] wcn36xx: Fix error handling path in 'wcn36xx_probe()'
2020-05-07 4:36 ` Christophe JAILLET
@ 2020-05-07 4:52 ` Bjorn Andersson
-1 siblings, 0 replies; 10+ messages in thread
From: Bjorn Andersson @ 2020-05-07 4:52 UTC (permalink / raw)
To: Christophe JAILLET
Cc: kvalo, davem, marcel, andy.gross, wcn36xx, linux-wireless,
netdev, linux-kernel, kernel-janitors
On Wed 06 May 21:36 PDT 2020, Christophe JAILLET wrote:
> 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: 5052de8deff5 ("soc: qcom: smd: Transition client drivers from smd to rpmsg")
It seems I introduced this bug in f303a9311065 ("wcn36xx: Transition
driver to SMD client"), but your patch should should apply back to your
Fixes, so I think it's good.
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Regards,
Bjorn
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> Not 100% sure of the commit for Fixes, but it is consistent with the
> analysis in efad8396e906 where the same call has been added in the remove
> function.
> ---
> drivers/net/wireless/ath/wcn36xx/main.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c
> index e49c306e0eef..1acdc13a74fc 100644
> --- a/drivers/net/wireless/ath/wcn36xx/main.c
> +++ b/drivers/net/wireless/ath/wcn36xx/main.c
> @@ -1339,7 +1339,7 @@ static int wcn36xx_probe(struct platform_device *pdev)
> if (addr && ret != ETH_ALEN) {
> wcn36xx_err("invalid local-mac-address\n");
> ret = -EINVAL;
> - goto out_wq;
> + goto out_channel;
> } else if (addr) {
> wcn36xx_info("mac address: %pM\n", addr);
> SET_IEEE80211_PERM_ADDR(wcn->hw, addr);
> @@ -1347,7 +1347,7 @@ static int wcn36xx_probe(struct platform_device *pdev)
>
> ret = wcn36xx_platform_get_resources(wcn, pdev);
> if (ret)
> - goto out_wq;
> + goto out_channel;
>
> wcn36xx_init_ieee80211(wcn);
> ret = ieee80211_register_hw(wcn->hw);
> @@ -1359,6 +1359,8 @@ static int wcn36xx_probe(struct platform_device *pdev)
> out_unmap:
> iounmap(wcn->ccu_base);
> iounmap(wcn->dxe_base);
> +out_channel:
> + rpmsg_destroy_ept(wcn->smd_channel);
> out_wq:
> ieee80211_free_hw(hw);
> out_err:
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] wcn36xx: Fix error handling path in 'wcn36xx_probe()'
@ 2020-05-07 4:52 ` Bjorn Andersson
0 siblings, 0 replies; 10+ messages in thread
From: Bjorn Andersson @ 2020-05-07 4:52 UTC (permalink / raw)
To: Christophe JAILLET
Cc: kvalo, davem, marcel, andy.gross, wcn36xx, linux-wireless,
netdev, linux-kernel, kernel-janitors
On Wed 06 May 21:36 PDT 2020, Christophe JAILLET wrote:
> 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: 5052de8deff5 ("soc: qcom: smd: Transition client drivers from smd to rpmsg")
It seems I introduced this bug in f303a9311065 ("wcn36xx: Transition
driver to SMD client"), but your patch should should apply back to your
Fixes, so I think it's good.
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Regards,
Bjorn
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> Not 100% sure of the commit for Fixes, but it is consistent with the
> analysis in efad8396e906 where the same call has been added in the remove
> function.
> ---
> drivers/net/wireless/ath/wcn36xx/main.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c
> index e49c306e0eef..1acdc13a74fc 100644
> --- a/drivers/net/wireless/ath/wcn36xx/main.c
> +++ b/drivers/net/wireless/ath/wcn36xx/main.c
> @@ -1339,7 +1339,7 @@ static int wcn36xx_probe(struct platform_device *pdev)
> if (addr && ret != ETH_ALEN) {
> wcn36xx_err("invalid local-mac-address\n");
> ret = -EINVAL;
> - goto out_wq;
> + goto out_channel;
> } else if (addr) {
> wcn36xx_info("mac address: %pM\n", addr);
> SET_IEEE80211_PERM_ADDR(wcn->hw, addr);
> @@ -1347,7 +1347,7 @@ static int wcn36xx_probe(struct platform_device *pdev)
>
> ret = wcn36xx_platform_get_resources(wcn, pdev);
> if (ret)
> - goto out_wq;
> + goto out_channel;
>
> wcn36xx_init_ieee80211(wcn);
> ret = ieee80211_register_hw(wcn->hw);
> @@ -1359,6 +1359,8 @@ static int wcn36xx_probe(struct platform_device *pdev)
> out_unmap:
> iounmap(wcn->ccu_base);
> iounmap(wcn->dxe_base);
> +out_channel:
> + rpmsg_destroy_ept(wcn->smd_channel);
> out_wq:
> ieee80211_free_hw(hw);
> out_err:
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] wcn36xx: Fix error handling path in wcn36xx_probe()
2020-05-07 4:36 ` Christophe JAILLET
@ 2020-05-07 17:39 ` Markus Elfring
-1 siblings, 0 replies; 10+ messages in thread
From: Markus Elfring @ 2020-05-07 17:39 UTC (permalink / raw)
To: Christophe Jaillet, linux-wireless, netdev, wcn36xx
Cc: kernel-janitors, linux-kernel, Andy Gross, Bjorn Andersson,
David S. Miller, Kalle Valo, Marcel Holtmann
…
> +++ b/drivers/net/wireless/ath/wcn36xx/main.c
…
> @@ -1359,6 +1359,8 @@ static int wcn36xx_probe(struct platform_device *pdev)
> out_unmap:
> iounmap(wcn->ccu_base);
> iounmap(wcn->dxe_base);
> +out_channel:
> + rpmsg_destroy_ept(wcn->smd_channel);
> out_wq:
> ieee80211_free_hw(hw);
> out_err:
How do you think about to use the label “out_destroy_ept”?
Regards,
Markus
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] wcn36xx: Fix error handling path in wcn36xx_probe()
@ 2020-05-07 17:39 ` Markus Elfring
0 siblings, 0 replies; 10+ messages in thread
From: Markus Elfring @ 2020-05-07 17:39 UTC (permalink / raw)
To: Christophe Jaillet, linux-wireless, netdev, wcn36xx
Cc: kernel-janitors, linux-kernel, Andy Gross, Bjorn Andersson,
David S. Miller, Kalle Valo, Marcel Holtmann
…
> +++ b/drivers/net/wireless/ath/wcn36xx/main.c
…
> @@ -1359,6 +1359,8 @@ static int wcn36xx_probe(struct platform_device *pdev)
> out_unmap:
> iounmap(wcn->ccu_base);
> iounmap(wcn->dxe_base);
> +out_channel:
> + rpmsg_destroy_ept(wcn->smd_channel);
> out_wq:
> ieee80211_free_hw(hw);
> out_err:
How do you think about to use the label “out_destroy_ept”?
Regards,
Markus
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] wcn36xx: Fix error handling path in wcn36xx_probe()
2020-05-07 17:39 ` Markus Elfring
@ 2020-05-07 17:47 ` Kalle Valo
-1 siblings, 0 replies; 10+ messages in thread
From: Kalle Valo @ 2020-05-07 17:47 UTC (permalink / raw)
To: Markus Elfring
Cc: Christophe Jaillet, linux-wireless, netdev, wcn36xx,
kernel-janitors, linux-kernel, Andy Gross, Bjorn Andersson,
David S. Miller, Marcel Holtmann
Markus Elfring <Markus.Elfring@web.de> writes:
> …
>> +++ b/drivers/net/wireless/ath/wcn36xx/main.c
> …
>> @@ -1359,6 +1359,8 @@ static int wcn36xx_probe(struct platform_device *pdev)
>> out_unmap:
>> iounmap(wcn->ccu_base);
>> iounmap(wcn->dxe_base);
>> +out_channel:
>> + rpmsg_destroy_ept(wcn->smd_channel);
>> out_wq:
>> ieee80211_free_hw(hw);
>> out_err:
>
> How do you think about to use the label “out_destroy_ept”?
Yeah, that's better. I'll change it in the pending branch before I
commit.
--
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] wcn36xx: Fix error handling path in wcn36xx_probe()
@ 2020-05-07 17:47 ` Kalle Valo
0 siblings, 0 replies; 10+ messages in thread
From: Kalle Valo @ 2020-05-07 17:47 UTC (permalink / raw)
To: Markus Elfring
Cc: Christophe Jaillet, linux-wireless, netdev, wcn36xx,
kernel-janitors, linux-kernel, Andy Gross, Bjorn Andersson,
David S. Miller, Marcel Holtmann
Markus Elfring <Markus.Elfring@web.de> writes:
> …
>> +++ b/drivers/net/wireless/ath/wcn36xx/main.c
> …
>> @@ -1359,6 +1359,8 @@ static int wcn36xx_probe(struct platform_device *pdev)
>> out_unmap:
>> iounmap(wcn->ccu_base);
>> iounmap(wcn->dxe_base);
>> +out_channel:
>> + rpmsg_destroy_ept(wcn->smd_channel);
>> out_wq:
>> ieee80211_free_hw(hw);
>> out_err:
>
> How do you think about to use the label “out_destroy_ept”?
Yeah, that's better. I'll change it in the pending branch before I
commit.
--
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] wcn36xx: Fix error handling path in 'wcn36xx_probe()'
2020-05-07 4:36 ` Christophe JAILLET
@ 2020-05-11 12:37 ` Kalle Valo
-1 siblings, 0 replies; 10+ messages in thread
From: Kalle Valo @ 2020-05-11 12:37 UTC (permalink / raw)
To: Christophe JAILLET
Cc: davem, bjorn.andersson, marcel, andy.gross, wcn36xx,
linux-wireless, netdev, linux-kernel, kernel-janitors,
Christophe JAILLET
Christophe JAILLET <christophe.jaillet@wanadoo.fr> wrote:
> 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: 5052de8deff5 ("soc: qcom: smd: Transition client drivers from smd to rpmsg")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Patch applied to ath-next branch of ath.git, thanks.
a86308fc534e wcn36xx: Fix error handling path in 'wcn36xx_probe()'
--
https://patchwork.kernel.org/patch/11532419/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] wcn36xx: Fix error handling path in 'wcn36xx_probe()'
@ 2020-05-11 12:37 ` Kalle Valo
0 siblings, 0 replies; 10+ messages in thread
From: Kalle Valo @ 2020-05-11 12:37 UTC (permalink / raw)
To: Christophe JAILLET
Cc: davem, bjorn.andersson, marcel, andy.gross, wcn36xx,
linux-wireless, netdev, linux-kernel, kernel-janitors
Christophe JAILLET <christophe.jaillet@wanadoo.fr> wrote:
> 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: 5052de8deff5 ("soc: qcom: smd: Transition client drivers from smd to rpmsg")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Patch applied to ath-next branch of ath.git, thanks.
a86308fc534e wcn36xx: Fix error handling path in 'wcn36xx_probe()'
--
https://patchwork.kernel.org/patch/11532419/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2020-05-11 12:38 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-07 4:36 [PATCH] wcn36xx: Fix error handling path in 'wcn36xx_probe()' Christophe JAILLET
2020-05-07 4:36 ` Christophe JAILLET
2020-05-07 4:52 ` Bjorn Andersson
2020-05-07 4:52 ` Bjorn Andersson
2020-05-11 12:37 ` Kalle Valo
2020-05-11 12:37 ` Kalle Valo
2020-05-07 17:39 [PATCH] wcn36xx: Fix error handling path in wcn36xx_probe() Markus Elfring
2020-05-07 17:39 ` Markus Elfring
2020-05-07 17:47 ` Kalle Valo
2020-05-07 17:47 ` Kalle Valo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.