]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - net/rfkill/core.c
rfkill: use variable instead of duplicating the expression
[mirror_ubuntu-artful-kernel.git] / net / rfkill / core.c
index 166439995f34d2cb3944f2475e02a6774abd0bdb..061ed37c07cfa04f800fcca18961857ddb80f445 100644 (file)
@@ -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;