projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8fa3b6f
)
rfkill: simplify rfkill_set_hw_state() slightly
author
Johannes Berg
<johannes.berg@intel.com>
Tue, 13 Dec 2016 08:38:25 +0000
(09:38 +0100)
committer
Johannes Berg
<johannes.berg@intel.com>
Tue, 13 Dec 2016 15:04:35 +0000
(16:04 +0100)
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>
net/rfkill/core.c
patch
|
blob
|
history
diff --git
a/net/rfkill/core.c
b/net/rfkill/core.c
index 884027f62783a6a975b42c0bdd5f39010df9834a..184bb711a06d6b257fdca10c2100da80fac7766f 100644
(file)
--- a/
net/rfkill/core.c
+++ b/
net/rfkill/core.c
@@
-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;