summaryrefslogtreecommitdiff
path: root/src/login/logind-button.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/login/logind-button.c')
-rw-r--r--src/login/logind-button.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/login/logind-button.c b/src/login/logind-button.c
index 3324c4622c..92c1b67951 100644
--- a/src/login/logind-button.c
+++ b/src/login/logind-button.c
@@ -239,9 +239,7 @@ int button_open(Button *b) {
assert(b);
- if (b->fd >= 0) {
- b->fd = safe_close(b->fd);
- }
+ b->fd = safe_close(b->fd);
p = strjoina("/dev/input/", b->name);