aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorScott Anderson <ascent12@hotmail.com>2017-10-02 22:01:09 +1300
committerScott Anderson <ascent12@hotmail.com>2017-10-02 22:01:09 +1300
commit9ec9edc40d4694dedfd7f00eb9106ce5ed133239 (patch)
tree0edda1dabfb6078dddb3f5b7cf9e24a1cdd18b13 /backend
parent6cfe47d1d891d31ef3e13deebbf899af27cadb82 (diff)
Check for fd failure properly
Diffstat (limited to 'backend')
-rw-r--r--backend/session/session.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/backend/session/session.c b/backend/session/session.c
index 72eb6149..b73952fd 100644
--- a/backend/session/session.c
+++ b/backend/session/session.c
@@ -242,7 +242,7 @@ static size_t explicit_find_gpus(struct wlr_session *session,
}
ret[i] = open_if_kms(session, ptr);
- if (ret[i] <= 0) {
+ if (ret[i] < 0) {
wlr_log(L_ERROR, "Unable to open %s as DRM device", ptr);
} else {
++i;