summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/rfkill/core.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/net/rfkill/core.c b/net/rfkill/core.c
index 884027f62783..184bb711a06d 100644
--- a/net/rfkill/core.c
+++ b/net/rfkill/core.c
@@ -478,10 +478,7 @@ bool rfkill_set_hw_state(struct rfkill *rfkill, bool blocked)
rfkill_led_trigger_event(rfkill);
- if (!rfkill->registered)
- return ret;
-
- if (prev != blocked)
+ if (rfkill->registered && prev != blocked)
schedule_work(&rfkill->uevent_work);
return ret;