1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/wireless/broadcom/b43
Dan Carpenter 9b793db5fc b43: fix a lower bounds test
The problem is that "channel" is an unsigned int, when it's less 5 the
value of "channel - 5" is not a negative number as one would expect but
is very high positive value instead.

This means that "start" becomes a very high positive value.  The result
of that is that we never enter the "for (i = start; i <= end; i++) {"
loop.  Instead of storing the result from b43legacy_radio_aci_detect()
it just uses zero.

Fixes: ef1a628d83 ("b43: Implement dynamic PHY API")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Michael Büsch <m@bues.ch>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20211006073621.GE8404@kili
2021-10-11 09:09:30 +03:00
..
b43.h b43: fix spelling mistake "hw_registred" -> "hw_registered" 2018-10-01 18:41:34 +03:00
bus.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 20 2019-05-21 11:28:46 +02:00
bus.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
debugfs.c b43: don't save dentries for debugfs 2021-05-21 20:46:41 +02:00
debugfs.h b43: don't save dentries for debugfs 2021-05-21 20:46:41 +02:00
dma.c b43: Use fallthrough pseudo-keyword 2020-08-27 16:08:22 +03:00
dma.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
leds.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 20 2019-05-21 11:28:46 +02:00
leds.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
lo.c treewide: Remove uninitialized_var() usage 2020-07-16 12:35:15 -07:00
lo.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
main.c cfg80211: constify ieee80211_get_response_rate return 2021-04-19 11:59:33 +02:00
main.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 20 2019-05-21 11:28:46 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
phy_a.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
phy_ac.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
phy_ac.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
phy_common.c b43: phy_common: Demote non-conformant kerneldoc header 2020-08-27 15:15:37 +03:00
phy_common.h b43: Use cordic algorithm from kernel library 2018-11-29 17:30:50 +02:00
phy_g.c b43: fix a lower bounds test 2021-10-11 09:09:30 +03:00
phy_g.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
phy_ht.c b43: phy_ht: Remove 9 year old TODO 2020-09-01 12:22:38 +03:00
phy_ht.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
phy_lcn.c cfg80211: remove enum ieee80211_band 2016-04-12 15:56:15 +02:00
phy_lcn.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
phy_lp.c b43: Replace HTTP links with HTTPS ones 2020-08-02 18:16:35 +03:00
phy_lp.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
phy_n.c b43: phy_n: Delete some useless TODO code 2021-06-03 12:30:43 +03:00
phy_n.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pio.c b43: Use fallthrough pseudo-keyword 2020-08-27 16:08:22 +03:00
pio.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ppr.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
ppr.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
radio_2055.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 20 2019-05-21 11:28:46 +02:00
radio_2055.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
radio_2056.c b43: Replace HTTP links with HTTPS ones 2020-08-02 18:16:35 +03:00
radio_2056.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
radio_2057.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 20 2019-05-21 11:28:46 +02:00
radio_2057.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
radio_2059.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 20 2019-05-21 11:28:46 +02:00
radio_2059.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rfkill.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 20 2019-05-21 11:28:46 +02:00
rfkill.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
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 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sysfs.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 20 2019-05-21 11:28:46 +02:00
sysfs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
tables.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 20 2019-05-21 11:28:46 +02:00
tables.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
tables_lpphy.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 20 2019-05-21 11:28:46 +02:00
tables_lpphy.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
tables_nphy.c b43: Use fallthrough pseudo-keyword 2020-08-27 16:08:22 +03:00
tables_nphy.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
tables_phy_ht.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 20 2019-05-21 11:28:46 +02:00
tables_phy_ht.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
tables_phy_lcn.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 20 2019-05-21 11:28:46 +02:00
tables_phy_lcn.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
wa.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 20 2019-05-21 11:28:46 +02:00
wa.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xmit.c treewide: Remove uninitialized_var() usage 2020-07-16 12:35:15 -07:00
xmit.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00