Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Revert "brcmfmac: add a check for the status of usb_register"

This reverts commit 42daad3343be4a4e1ee03e30a5f5cc731dadfef5.

Because of recent interactions with developers from @umn.edu, all
commits from them have been recently re-reviewed to ensure if they were
correct or not.

Upon review, this commit was found to be incorrect for the reasons
below, so it must be reverted. It will be fixed up "correctly" in a
later kernel change.

The original commit here did nothing to actually help if usb_register()
failed, so it gives a "false sense of security" when there is none. The
correct solution is to correctly unwind from this error.

Cc: Kangjie Lu <kjlu@umn.edu>
Cc: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210503115736.2104747-69-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

+1 -5
+1 -5
drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
··· 1586 1586 1587 1587 void brcmf_usb_register(void) 1588 1588 { 1589 - int ret; 1590 - 1591 1589 brcmf_dbg(USB, "Enter\n"); 1592 - ret = usb_register(&brcmf_usbdrvr); 1593 - if (ret) 1594 - brcmf_err("usb_register failed %d\n", ret); 1590 + usb_register(&brcmf_usbdrvr); 1595 1591 }