Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 49d965c8 authored by Michael Buesch's avatar Michael Buesch Committed by John W. Linville
Browse files

b43: Protect sanity check against physical device removal



Fix IRQ mask sanity check for physically pulled device.

Tested-by: default avatarAndrew Price <andy@andrewprice.me.uk>
Signed-off-by: default avatarMichael Buesch <mb@bu3sch.de>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 886e71de
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -3874,6 +3874,7 @@ static struct b43_wldev * b43_wireless_core_stop(struct b43_wldev *dev)
{
	struct b43_wl *wl = dev->wl;
	struct b43_wldev *orig_dev;
	u32 mask;

redo:
	if (!dev || b43_status(dev) < B43_STAT_STARTED)
@@ -3920,7 +3921,8 @@ static struct b43_wldev * b43_wireless_core_stop(struct b43_wldev *dev)
			goto redo;
		return dev;
	}
	B43_WARN_ON(b43_read32(dev, B43_MMIO_GEN_IRQ_MASK));
	mask = b43_read32(dev, B43_MMIO_GEN_IRQ_MASK);
	B43_WARN_ON(mask != 0xFFFFFFFF && mask);

	/* Drain the TX queue */
	while (skb_queue_len(&wl->tx_queue))