2018-12-26 01:23:02

by Kangjie Lu

[permalink] [raw]
Subject: [PATCH] net: brcm80211: add a check for the status of usb_register

usb_register() may fail, so let's check its status and issue an error
message if it fails.

Signed-off-by: Kangjie Lu <[email protected]>
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
index a4308c6e72d7..76cfaf6999c8 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
@@ -1550,6 +1550,10 @@ void brcmf_usb_exit(void)

void brcmf_usb_register(void)
{
+ int ret;
+
brcmf_dbg(USB, "Enter\n");
- usb_register(&brcmf_usbdrvr);
+ ret = usb_register(&brcmf_usbdrvr);
+ if (ret)
+ brcmf_err("usb_register failed %d\n", ret);
}
--
2.17.2 (Apple Git-113)



2019-01-08 16:44:08

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] net: brcm80211: add a check for the status of usb_register

Kangjie Lu <[email protected]> writes:

> usb_register() may fail, so let's check its status and issue an error
> message if it fails.
>
> Signed-off-by: Kangjie Lu <[email protected]>
> ---
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 6 +++++-

The title prefix should be "brcmfmac: " but I can fix that.

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#commit_title_is_wrong

--
Kalle Valo

2019-01-09 08:28:31

by Arend Van Spriel

[permalink] [raw]
Subject: Re: [PATCH] net: brcm80211: add a check for the status of usb_register

On 1/8/2019 5:43 PM, Kalle Valo wrote:
> Kangjie Lu <[email protected]> writes:
>
>> usb_register() may fail, so let's check its status and issue an error
>> message if it fails.
>>
>> Signed-off-by: Kangjie Lu <[email protected]>
>> ---
>> drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 6 +++++-
>
> The title prefix should be "brcmfmac: " but I can fix that.

Hi Kalle,

I wanted to ack this patch, but can not locate it in my email not in
linux-wireless patchwork. Was it posted to the networking list only?

Using scripts/get_maintainer.pl with the patch would reveal the lists to
post to in order of preference. For wireless driver changes I refrain to
linux-wireless only, but that is a personal choice I guess.

Regards,
Arend

> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#commit_title_is_wrong
>

2019-01-09 11:17:47

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] net: brcm80211: add a check for the status of usb_register

Arend Van Spriel <[email protected]> writes:

> On 1/8/2019 5:43 PM, Kalle Valo wrote:
>> Kangjie Lu <[email protected]> writes:
>>
>>> usb_register() may fail, so let's check its status and issue an error
>>> message if it fails.
>>>
>>> Signed-off-by: Kangjie Lu <[email protected]>
>>> ---
>>> drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 6 +++++-
>>
>> The title prefix should be "brcmfmac: " but I can fix that.
>
> Hi Kalle,
>
> I wanted to ack this patch, but can not locate it in my email not in
> linux-wireless patchwork. Was it posted to the networking list only?

I do see it on linux-wireless patchwork:

https://patchwork.kernel.org/patch/10742769/

> Using scripts/get_maintainer.pl with the patch would reveal the lists
> to post to in order of preference. For wireless driver changes I
> refrain to linux-wireless only, but that is a personal choice I guess.

Yeah, I guess in general wireless patches are just noise for netdev
people.

--
Kalle Valo

2019-01-10 11:38:16

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] brcmfmac: add a check for the status of usb_register

Kangjie Lu <[email protected]> wrote:

> usb_register() may fail, so let's check its status and issue an error
> message if it fails.
>
> Signed-off-by: Kangjie Lu <[email protected]>

Patch applied to wireless-drivers-next.git, thanks.

42daad3343be brcmfmac: add a check for the status of usb_register

--
https://patchwork.kernel.org/patch/10742769/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches