• Arnd Bergmann's avatar
    brcmfmac: fix false-positive -Wmaybe-unintialized warning · 412dd15c
    Arnd Bergmann authored
    When CONFIG_NO_AUTO_INLINE is set, we get a false-postive warning
    for the brcmf_fw_request_nvram_done() function, after gcc figures
    out that brcmf_fw_nvram_from_efi() might not set the 'data_len'
    variable, but fails to notice that it always returns NULL:
    
    drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c: In function 'brcmf_fw_request_nvram_done':
    drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c:560:11: error: 'data_len' may be used uninitialized in this function [-Werror=maybe-uninitialized]
    
    Mark it 'inline' to force gcc to understand this.
    
    Fixes: ce2e6db5 ("brcmfmac: Add support for getting nvram contents from EFI variables")
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
    Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
    412dd15c
firmware.c 18.6 KB