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

brcm80211: fmac: initialize host interface drivers regardless result

The module init function of brcmfmac calls init functions for SDIO and
USB doing driver registration. This patch removes terminating the module
init when a driver registration for one host interface fails.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by

Arend van Spriel and committed by
John W. Linville
549040ab 1d9c1796

+8 -18
+1 -3
drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c
··· 604 604 sdio_unregister_driver(&brcmf_sdmmc_driver); 605 605 } 606 606 607 - int brcmf_sdio_init(void) 607 + void brcmf_sdio_init(void) 608 608 { 609 609 int ret; 610 610 ··· 614 614 615 615 if (ret) 616 616 brcmf_dbg(ERROR, "sdio_register_driver failed: %d\n", ret); 617 - 618 - return ret; 619 617 }
+2 -2
drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h
··· 108 108 109 109 #ifdef CONFIG_BRCMFMAC_SDIO 110 110 extern void brcmf_sdio_exit(void); 111 - extern int brcmf_sdio_init(void); 111 + extern void brcmf_sdio_init(void); 112 112 #endif 113 113 #ifdef CONFIG_BRCMFMAC_USB 114 114 extern void brcmf_usb_exit(void); 115 - extern int brcmf_usb_init(void); 115 + extern void brcmf_usb_init(void); 116 116 #endif 117 117 118 118 #endif /* _BRCMF_BUS_H_ */
+3 -11
drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
··· 1183 1183 1184 1184 static int __init brcmfmac_init(void) 1185 1185 { 1186 - int ret = 0; 1187 - 1188 1186 #ifdef CONFIG_BRCMFMAC_SDIO 1189 - ret = brcmf_sdio_init(); 1190 - if (ret) 1191 - goto fail; 1187 + brcmf_sdio_init(); 1192 1188 #endif 1193 1189 #ifdef CONFIG_BRCMFMAC_USB 1194 - ret = brcmf_usb_init(); 1195 - if (ret) 1196 - goto fail; 1190 + brcmf_usb_init(); 1197 1191 #endif 1198 - 1199 - fail: 1200 - return ret; 1192 + return 0; 1201 1193 } 1202 1194 1203 1195 static void __exit brcmfmac_exit(void)
+2 -2
drivers/net/wireless/brcm80211/brcmfmac/usb.c
··· 1615 1615 g_image.len = 0; 1616 1616 } 1617 1617 1618 - int brcmf_usb_init(void) 1618 + void brcmf_usb_init(void) 1619 1619 { 1620 - return usb_register(&brcmf_usbdrvr); 1620 + usb_register(&brcmf_usbdrvr); 1621 1621 }