mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
800e7a205a
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:
|
||
---|---|---|
.. | ||
b43.h | ||
bus.c | ||
bus.h | ||
debugfs.c | ||
debugfs.h | ||
dma.c | ||
dma.h | ||
Kconfig | ||
leds.c | ||
leds.h | ||
lo.c | ||
lo.h | ||
main.c | ||
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 | ||
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 | ||
sdio.h | ||
sysfs.c | ||
sysfs.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 | ||
tables.c | ||
tables.h | ||
wa.c | ||
wa.h | ||
xmit.c | ||
xmit.h |