mirror of https://gitee.com/openkylin/linux.git
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: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
8fa3b6f939
commit
74204f8fa1
|
@ -478,10 +478,7 @@ bool rfkill_set_hw_state(struct rfkill *rfkill, bool blocked)
|
||||||
|
|
||||||
rfkill_led_trigger_event(rfkill);
|
rfkill_led_trigger_event(rfkill);
|
||||||
|
|
||||||
if (!rfkill->registered)
|
if (rfkill->registered && prev != blocked)
|
||||||
return ret;
|
|
||||||
|
|
||||||
if (prev != blocked)
|
|
||||||
schedule_work(&rfkill->uevent_work);
|
schedule_work(&rfkill->uevent_work);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in New Issue