1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/wireless/broadcom/b43legacy
Dan Carpenter c1c8380b03 b43legacy: 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: 75388acd0c ("[B43LEGACY]: add mac80211-based driver for legacy BCM43xx devices")
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/20211006073542.GD8404@kili
2021-10-11 09:09:29 +03:00
..
b43legacy.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 b43legacy: don't save dentries for debugfs 2021-05-21 20:46:37 +02:00
debugfs.h b43legacy: don't save dentries for debugfs 2021-05-21 20:46:37 +02:00
dma.c b43legacy: Remove unused inline function txring_to_priority() 2021-06-03 12:31:13 +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
ilt.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 20 2019-05-21 11:28:46 +02:00
ilt.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
main.c b43legacy: Fix spelling mistake "overflew" -> "overflowed" 2021-06-03 12:31:53 +03: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.c b43legacy: Replace HTTP links with HTTPS ones 2020-08-02 18:17:37 +03:00
phy.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 20 2019-05-21 11:28:46 +02:00
pio.c b43legacy: convert tasklets to use new tasklet_setup() API 2020-08-27 16:22:04 +03:00
pio.h drivers: Remove explicit invocations of mmiowb() 2019-04-08 12:01:02 +01:00
radio.c b43legacy: fix a lower bounds test 2021-10-11 09:09:29 +03:00
radio.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 20 2019-05-21 11:28:46 +02: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
sysfs.c b43legacy: replace simple_strtol() with kstrtoint() 2020-03-12 15:40:45 +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
xmit.c b43legacy: Fix case where channel status is corrupted 2020-04-14 18:07:44 +03: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