aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2008-06-15 16:01:24 +0200
committerJohn W. Linville <linville@tuxdriver.com>2008-06-25 10:55:09 -0400
commit7b3abfc87ec13a81b255012b6e1bd4caeeb05aec (patch)
treed3b4d5e431ed9df28a1d7409658600bfaf26e2ed /drivers/net/wireless
parent664f200610a3c9641ff58fc91b986b804cb1cc2d (diff)
b43: Fix possible MMIO access while device is down
This fixes a possible MMIO access while the device is still down from a suspend cycle. MMIO accesses with the device powered down may cause crashes on certain devices. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/b43/leds.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/b43/leds.c b/drivers/net/wireless/b43/leds.c
index 36a9c42df83..76f4c7bad8b 100644
--- a/drivers/net/wireless/b43/leds.c
+++ b/drivers/net/wireless/b43/leds.c
@@ -72,6 +72,9 @@ static void b43_led_brightness_set(struct led_classdev *led_dev,
struct b43_wldev *dev = led->dev;
bool radio_enabled;
+ if (unlikely(b43_status(dev) < B43_STAT_INITIALIZED))
+ return;
+
/* Checking the radio-enabled status here is slightly racy,
* but we want to avoid the locking overhead and we don't care
* whether the LED has the wrong state for a second. */