]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
b43: Fix possible MMIO access while device is down
authorMichael Buesch <mb@bu3sch.de>
Thu, 3 Jul 2008 00:04:33 +0000 (02:04 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 24 Jul 2008 16:14:02 +0000 (09:14 -0700)
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.

Upstream commit is
33598cf261e393f2b3349cb55509e358014bfd1f

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/wireless/b43/leds.c

index 0aac1ff511df768a6ea38175e22a270a00ebaf20..23d4c095f5e70dbba95756cd72280310676b3f82 100644 (file)
@@ -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. */