From 9ec9edc40d4694dedfd7f00eb9106ce5ed133239 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Mon, 2 Oct 2017 22:01:09 +1300 Subject: Check for fd failure properly --- backend/session/session.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.3