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

Commit c70762f9 authored by Alban Browaeys's avatar Alban Browaeys Committed by John W. Linville
Browse files

rt2x00 : bail out of regbusy_read if device is removed.



platform rfkill is async thus we may try to read while the device is
already off.

Signed-off-by: default avatarAlban Browaeys <prahal@yahoo.com>
Acked-by: default avatarGertjan van Wingerde <gwingerde@gmail.com>
Acked-by: default avatarIvo van Doorn <ivdoorn@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 050e8a47
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -41,6 +41,9 @@ int rt2x00pci_regbusy_read(struct rt2x00_dev *rt2x00dev,
{
	unsigned int i;

	if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags))
		return 0;

	for (i = 0; i < REGISTER_BUSY_COUNT; i++) {
		rt2x00pci_register_read(rt2x00dev, offset, reg);
		if (!rt2x00_get_field32(*reg, field))