diff options
author | Kangjie Lu <kjlu@umn.edu> | 2018-12-26 04:22:24 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2019-01-10 14:36:38 +0300 |
commit | 42daad3343be4a4e1ee03e30a5f5cc731dadfef5 (patch) | |
tree | 17c1bf8ddffc095ead466bb12b26bb6f4a7db13f | |
parent | 06605b0d38b491c6dc52f4aee3e588e1309fbfaf (diff) | |
download | linux-42daad3343be4a4e1ee03e30a5f5cc731dadfef5.tar.xz |
brcmfmac: 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 <kjlu@umn.edu>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-rw-r--r-- | drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 6 |
1 files changed, 5 insertions, 1 deletions
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); } |