2013-04-19 02:16:56

by Wei Yongjun

[permalink] [raw]
Subject: [PATCH -next] brcmfmac: fix error return code in brcmf_fws_init()

From: Wei Yongjun <[email protected]>

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <[email protected]>
---
drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c b/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
index 1bcd58c..df2ac2f 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
@@ -1875,8 +1875,9 @@ int brcmf_fws_init(struct brcmf_pub *drvr)
goto fail;
}

- if (brcmf_fweh_register(drvr, BRCMF_E_FIFO_CREDIT_MAP,
- brcmf_fws_notify_credit_map)) {
+ rc = brcmf_fweh_register(drvr, BRCMF_E_FIFO_CREDIT_MAP,
+ brcmf_fws_notify_credit_map);
+ if (rc) {
brcmf_err("register credit map handler failed\n");
goto fail;
}



2013-04-19 08:11:45

by Arend van Spriel

[permalink] [raw]
Subject: Re: [PATCH -next] brcmfmac: fix error return code in brcmf_fws_init()

On 04/19/2013 04:10 AM, Wei Yongjun wrote:
> From: Wei Yongjun <[email protected]>
>
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function.
>

Thanks for the patch. However, I would like to solve it differently. I
will sent out a patch for handling this.

Regards,
Arend

> Signed-off-by: Wei Yongjun <[email protected]>
> ---
> drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c b/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
> index 1bcd58c..df2ac2f 100644
> --- a/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
> +++ b/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
> @@ -1875,8 +1875,9 @@ int brcmf_fws_init(struct brcmf_pub *drvr)
> goto fail;
> }
>
> - if (brcmf_fweh_register(drvr, BRCMF_E_FIFO_CREDIT_MAP,
> - brcmf_fws_notify_credit_map)) {
> + rc = brcmf_fweh_register(drvr, BRCMF_E_FIFO_CREDIT_MAP,
> + brcmf_fws_notify_credit_map);
> + if (rc) {
> brcmf_err("register credit map handler failed\n");
> goto fail;
> }
>
>