aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/rfkill/core.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/rfkill/core.c b/net/rfkill/core.c
index 4e68ab439d5d..868d79f8ac1d 100644
--- a/net/rfkill/core.c
+++ b/net/rfkill/core.c
@@ -270,6 +270,9 @@ static void rfkill_set_block(struct rfkill *rfkill, bool blocked)
270 unsigned long flags; 270 unsigned long flags;
271 int err; 271 int err;
272 272
273 if (unlikely(rfkill->dev.power.power_state.event & PM_EVENT_SLEEP))
274 return;
275
273 /* 276 /*
274 * Some platforms (...!) generate input events which affect the 277 * Some platforms (...!) generate input events which affect the
275 * _hard_ kill state -- whenever something tries to change the 278 * _hard_ kill state -- whenever something tries to change the
@@ -292,9 +295,6 @@ static void rfkill_set_block(struct rfkill *rfkill, bool blocked)
292 rfkill->state |= RFKILL_BLOCK_SW_SETCALL; 295 rfkill->state |= RFKILL_BLOCK_SW_SETCALL;
293 spin_unlock_irqrestore(&rfkill->lock, flags); 296 spin_unlock_irqrestore(&rfkill->lock, flags);
294 297
295 if (unlikely(rfkill->dev.power.power_state.event & PM_EVENT_SLEEP))
296 return;
297
298 err = rfkill->ops->set_block(rfkill->data, blocked); 298 err = rfkill->ops->set_block(rfkill->data, blocked);
299 299
300 spin_lock_irqsave(&rfkill->lock, flags); 300 spin_lock_irqsave(&rfkill->lock, flags);