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
6 usb_register() may fail, so let's check its status and issue an error
9 Signed-off-by: Kangjie Lu <kjlu@umn.edu>
10 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
12 drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 6 +++++-
13 1 file changed, 5 insertions(+), 1 deletion(-)
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)
19 void brcmf_usb_register(void)
23 brcmf_dbg(USB, "Enter\n");
24 - usb_register(&brcmf_usbdrvr);
25 + ret = usb_register(&brcmf_usbdrvr);
27 + brcmf_err("usb_register failed %d\n", ret);