aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/leds.c
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2008-06-15 10:01:24 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-06-25 10:55:09 -0400
commit7b3abfc87ec13a81b255012b6e1bd4caeeb05aec (patch)
treed3b4d5e431ed9df28a1d7409658600bfaf26e2ed /drivers/net/wireless/b43/leds.c
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/b43/leds.c')
-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 36a9c42df835..76f4c7bad8b8 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,
72 struct b43_wldev *dev = led->dev; 72 struct b43_wldev *dev = led->dev;
73 bool radio_enabled; 73 bool radio_enabled;
74 74
75 if (unlikely(b43_status(dev) < B43_STAT_INITIALIZED))
76 return;
77
75 /* Checking the radio-enabled status here is slightly racy, 78 /* Checking the radio-enabled status here is slightly racy,
76 * but we want to avoid the locking overhead and we don't care 79 * but we want to avoid the locking overhead and we don't care
77 * whether the LED has the wrong state for a second. */ 80 * whether the LED has the wrong state for a second. */