Commit 74204f8f authored by Johannes Berg's avatar Johannes Berg

rfkill: simplify rfkill_set_hw_state() slightly

Simplify the two conditions gating the schedule_work() into
a single one and get rid of the additional exit point from
the function in doing so.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 8fa3b6f9
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment