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

Commit f3e7fae2 authored by João Paulo Rechi Vita's avatar João Paulo Rechi Vita Committed by Johannes Berg
Browse files

rfkill: use variable instead of duplicating the expression



RFKILL_BLOCK_SW value have just been saved to prev, no need to check it
again in the if expression. This makes code a little bit easier to read.

Signed-off-by: default avatarJoão Paulo Rechi Vita <jprvita@endlessm.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 573a2b51
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -287,7 +287,7 @@ static void rfkill_set_block(struct rfkill *rfkill, bool blocked)
	spin_lock_irqsave(&rfkill->lock, flags);
	prev = rfkill->state & RFKILL_BLOCK_SW;

	if (rfkill->state & RFKILL_BLOCK_SW)
	if (prev)
		rfkill->state |= RFKILL_BLOCK_SW_PREV;
	else
		rfkill->state &= ~RFKILL_BLOCK_SW_PREV;