Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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 <johannes.berg@intel.com>
parent 8fa3b6f9
Loading
Loading
Loading
Loading
+1 −4
Original line number Original line Diff line number Diff line
@@ -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;