1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/wireless/realtek
Tom Rix ddcd945e55 rtw88: fix fw_fifo_addr check
The clang build reports this warning

fw.c:1485:21: warning: address of array 'rtwdev->chip->fw_fifo_addr'
  will always evaluate to 'true'
        if (!rtwdev->chip->fw_fifo_addr) {

fw_fifo_addr is an array in rtw_chip_info so it is always
nonzero.  A better check is if the first element of the array is
nonzero.  In the cases where fw_fifo_addr is initialized by rtw88b
and rtw88c, the first array element is 0x780.

Fixes: 0fbc2f0f34 ("rtw88: add dump firmware fifo support")
Signed-off-by: Tom Rix <trix@redhat.com>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Acked-by: Tzu-En Huang <tehuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20201011155438.15892-1-trix@redhat.com
2020-11-02 20:16:02 +02:00
..
rtl8xxxu rtl8xxxu: prevent potential memory leak 2020-09-09 10:29:43 +03:00
rtl818x rtl818x_pci: switch from 'pci_' to 'dma_' API 2020-09-01 12:34:20 +03:00
rtlwifi rtlwifi: rtl8192se: remove duplicated legacy_httxpowerdiff 2020-10-08 13:47:14 +03:00
rtw88 rtw88: fix fw_fifo_addr check 2020-11-02 20:16:02 +02:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00