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

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 <>
parent 8fa3b6f9
......@@ -478,10 +478,7 @@ bool rfkill_set_hw_state(struct rfkill *rfkill, bool blocked)
if (!rfkill->registered)
return ret;
if (prev != blocked)
if (rfkill->registered && prev != blocked)
return ret;
Supports Markdown
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