356891067851b02b027efb493ca93ad9ccbf9a56
[openwrt/staging/blocktrron.git] /
1 From 42daad3343be4a4e1ee03e30a5f5cc731dadfef5 Mon Sep 17 00:00:00 2001
2 From: Kangjie Lu <kjlu@umn.edu>
3 Date: Tue, 25 Dec 2018 19:22:24 -0600
4 Subject: [PATCH] brcmfmac: add a check for the status of usb_register
5
6 usb_register() may fail, so let's check its status and issue an error
7 message if it fails.
8
9 Signed-off-by: Kangjie Lu <kjlu@umn.edu>
10 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
11 ---
12 drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 6 +++++-
13 1 file changed, 5 insertions(+), 1 deletion(-)
14
15 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
16 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
17 @@ -1552,6 +1552,10 @@ void brcmf_usb_exit(void)
18
19 void brcmf_usb_register(void)
20 {
21 + int ret;
22 +
23 brcmf_dbg(USB, "Enter\n");
24 - usb_register(&brcmf_usbdrvr);
25 + ret = usb_register(&brcmf_usbdrvr);
26 + if (ret)
27 + brcmf_err("usb_register failed %d\n", ret);
28 }