linux/drivers/net/wireless/broadcom/b43
Kees Cook 800e7a205a b43: Remove uninitialized_var() usage
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. As a precursor
to removing[2] this[3] macro[4], just initialize this variable to NULL.
No later NULL deref is possible due to the early returns outside of the
(phy->rev >= 7 && phy->rev < 19) case, which explicitly tests for NULL.

[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/

Fixes: 58619b14d1 ("b43: move under broadcom vendor directory")
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200620033007.1444705-5-keescook@chromium.org
2020-07-15 13:36:38 +03:00
..
b43.h
bus.c
bus.h
debugfs.c
debugfs.h
dma.c
dma.h
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
leds.c
leds.h
lo.c
lo.h
main.c broadcom: fix wiki website url 2020-07-15 13:18:41 +03:00
main.h
Makefile
phy_a.h
phy_ac.c
phy_ac.h
phy_common.c
phy_common.h
phy_g.c
phy_g.h
phy_ht.c
phy_ht.h
phy_lcn.c
phy_lcn.h
phy_lp.c
phy_lp.h
phy_n.c b43: Remove uninitialized_var() usage 2020-07-15 13:36:38 +03:00
phy_n.h
pio.c
pio.h
ppr.c
ppr.h
radio_2055.c
radio_2055.h
radio_2056.c
radio_2056.h
radio_2057.c
radio_2057.h
radio_2059.c
radio_2059.h
rfkill.c
rfkill.h
sdio.c mmc: sdio: Move SDIO IDs from b43-sdio driver to common include file 2020-05-29 12:37:59 +02:00
sdio.h
sysfs.c
sysfs.h
tables.c
tables.h
tables_lpphy.c
tables_lpphy.h
tables_nphy.c
tables_nphy.h
tables_phy_ht.c
tables_phy_ht.h
tables_phy_lcn.c
tables_phy_lcn.h
wa.c
wa.h
xmit.c b43: remove dead function b43_rssinoise_postprocess() 2020-05-07 13:04:21 -07:00
xmit.h