linux/drivers/net/wireless
Nathan Chancellor 091c6e9c08 rtlwifi: Remove unnecessary NULL check in rtl_regd_init
When building with Clang + -Wtautological-pointer-compare:

drivers/net/wireless/realtek/rtlwifi/regd.c:389:33: warning: comparison
of address of 'rtlpriv->regd' equal to a null pointer is always false
[-Wtautological-pointer-compare]
        if (wiphy == NULL || &rtlpriv->regd == NULL)
                              ~~~~~~~~~^~~~    ~~~~
1 warning generated.

The address of an array member is never NULL unless it is the first
struct member so remove the unnecessary check. This was addressed in
the staging version of the driver in commit f986978b32 ("Staging:
rtlwifi: remove unnecessary NULL check").

While we are here, fix the following checkpatch warning:

CHECK: Comparison to NULL could be written "!wiphy"
35: FILE: drivers/net/wireless/realtek/rtlwifi/regd.c:389:
+       if (wiphy == NULL)

Fixes: 0c8173385e ("rtl8192ce: Add new driver")
Link:https://github.com/ClangBuiltLinux/linux/issues/750
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2019-10-24 08:47:07 +03:00
..
admtek treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 501 2019-06-19 17:09:56 +02:00
ath net/wireless: Delete unnecessary checks before the macro call “dev_kfree_skb” 2019-10-15 08:27:02 +03:00
atmel drivers: net: Fix Kconfig indentation 2019-09-26 08:56:17 +02:00
broadcom wireless: Remove call to memset after dma_alloc_coherent 2019-10-15 08:20:16 +03:00
cisco airo: fix memory leaks 2019-09-03 16:39:33 +03:00
intel net/wireless: Delete unnecessary checks before the macro call “dev_kfree_skb” 2019-10-15 08:27:02 +03:00
intersil hostap: use %*ph to print small buffer 2019-09-06 17:12:02 +03:00
marvell mwifiex: pcie: Fix memory leak in mwifiex_pcie_init_evt_ring 2019-10-09 11:25:22 +03:00
mediatek net/wireless: Delete unnecessary checks before the macro call “dev_kfree_skb” 2019-10-15 08:27:02 +03:00
quantenna wireless: Remove call to memset after dma_alloc_coherent 2019-10-15 08:20:16 +03:00
ralink drivers: net: Fix Kconfig indentation 2019-09-26 08:56:17 +02:00
realtek rtlwifi: Remove unnecessary NULL check in rtl_regd_init 2019-10-24 08:47:07 +03:00
rsi rsi: drop bogus device-id checks from probe 2019-10-09 11:23:46 +03:00
st net/wireless: Delete unnecessary checks before the macro call “dev_kfree_skb” 2019-10-15 08:27:02 +03:00
ti wlcore: clean-up clearing of WL1271_FLAG_IRQ_RUNNING 2019-10-11 11:55:40 +03:00
zydas zd1211rw: zd_usb: Use "%zu" to format size_t 2019-09-21 08:57:35 +03:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
mac80211_hwsim.c mac80211_hwsim: Register support for HE meshpoint 2019-09-11 09:33:29 +02:00
mac80211_hwsim.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
Makefile
ray_cs.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 416 2019-06-05 17:37:15 +02:00
ray_cs.h
rayctl.h
rndis_wlan.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
virt_wifi.c timekeeping: Use proper clock specifier names in functions 2019-06-22 12:11:27 +02:00
wl3501_cs.c wl3501_cs: remove redundant variable rc 2019-07-24 14:45:24 +03:00
wl3501.h