提交 74204f8f 编写于 作者: J 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: NJohannes Berg <johannes.berg@intel.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册