linux-stable/drivers/net/wireless
Kees Cook d68627697d treewide: Remove uninitialized_var() usage
commit 3f649ab728 upstream.

Using uninitialized_var() is dangerous as it papers over real bugs[1]
(or can in the future), and suppresses unrelated compiler warnings
(e.g. "unused variable"). If the compiler thinks it is uninitialized,
either simply initialize the variable or make compiler changes.

In preparation for removing[2] the[3] macro[4], remove all remaining
needless uses with the following script:

git grep '\buninitialized_var\b' | cut -d: -f1 | sort -u | \
	xargs perl -pi -e \
		's/\buninitialized_var\(([^\)]+)\)/\1/g;
		 s:\s*/\* (GCC be quiet|to make compiler happy) \*/$::g;'

drivers/video/fbdev/riva/riva_hw.c was manually tweaked to avoid
pathological white-space.

No outstanding warnings were found building allmodconfig with GCC 9.3.0
for x86_64, i386, arm64, arm, powerpc, powerpc64le, s390x, mips, sparc64,
alpha, and m68k.

[1] https://lore.kernel.org/lkml/20200603174714.192027-1-glider@google.com/
[2] https://lore.kernel.org/lkml/CA+55aFw+Vbj0i=1TGqCR5vQkCzWJ0QxK6CernOU6eedsudAixw@mail.gmail.com/
[3] https://lore.kernel.org/lkml/CA+55aFwgbgqhbp1fkxvRKEpzyR5J8n1vKT1VZdz9knmPuXhOeg@mail.gmail.com/
[4] https://lore.kernel.org/lkml/CA+55aFz2500WfbKXAx8s67wrm9=yVJu65TpLgN_ybYNv0VEOKA@mail.gmail.com/

Reviewed-by: Leon Romanovsky <leonro@mellanox.com> # drivers/infiniband and mlx4/mlx5
Acked-by: Jason Gunthorpe <jgg@mellanox.com> # IB
Acked-by: Kalle Valo <kvalo@codeaurora.org> # wireless drivers
Reviewed-by: Chao Yu <yuchao0@huawei.com> # erofs
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-11 11:33:32 +02:00
..
admtek
ath treewide: Remove uninitialized_var() usage 2023-08-11 11:33:32 +02:00
atmel
broadcom treewide: Remove uninitialized_var() usage 2023-08-11 11:33:32 +02:00
cisco airo: Fix read overflows sending packets 2020-06-11 09:22:58 +02:00
intel treewide: Remove uninitialized_var() usage 2023-08-11 11:33:32 +02:00
intersil wifi: orinoco: check return value of hermes_write_wordrec() 2023-03-11 16:26:36 +01:00
marvell wifi: mwifiex: fix loop iterator in mwifiex_update_ampdu_txwinsize() 2023-03-11 16:26:37 +01:00
mediatek mt7601u: add USB device ID for some versions of XiaoDu WiFi Dongle. 2022-08-25 11:11:10 +02:00
quantenna qtnfmac: fix resource leaks on unsupported iftype error return path 2020-10-29 09:07:06 +01:00
ralink wifi: rt2x00: correctly set BBP register 86 for MT7620 2022-10-26 13:17:10 +02:00
realtek wifi: rtlwifi: 8192de: correct checking of IQK reload 2023-06-09 10:22:55 +02:00
rsi rsi: fix control-message timeout 2021-11-12 14:28:26 +01:00
st cw1200: add missing MODULE_DEVICE_TABLE 2021-07-20 16:17:44 +02:00
ti wl1251: Fix possible buffer overflow in wl1251_cmd_scan 2021-07-20 16:17:44 +02:00
zydas zd1211rw: fix storage endpoint lookup 2020-02-05 14:18:04 +00:00
Kconfig
Makefile
mac80211_hwsim.c wifi: mac80211_hwsim: fix debugfs attribute ps with rc table support 2022-12-08 11:16:29 +01:00
mac80211_hwsim.h
ray_cs.c ray_cs: Check ioremap return value 2022-04-20 09:08:16 +02:00
ray_cs.h
rayctl.h
rndis_wlan.c wifi: rndis_wlan: Prevent buffer overflow in rndis_query_oid 2023-02-06 07:46:29 +01:00
wl3501.h wl3501_cs: Fix out-of-bounds warnings in wl3501_mgmt_join 2021-05-22 10:57:37 +02:00
wl3501_cs.c wifi: wl3501_cs: don't call kfree_skb() under spin_lock_irqsave() 2023-03-11 16:26:36 +01:00