Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Michael Buesch and committed by
John W. Linville
7b3abfc8 664f2006

+3
+3
drivers/net/wireless/b43/leds.c
··· 72 72 struct b43_wldev *dev = led->dev; 73 73 bool radio_enabled; 74 74 75 + if (unlikely(b43_status(dev) < B43_STAT_INITIALIZED)) 76 + return; 77 + 75 78 /* Checking the radio-enabled status here is slightly racy, 76 79 * but we want to avoid the locking overhead and we don't care 77 80 * whether the LED has the wrong state for a second. */