mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-17 06:46:39 -04:00
backend/session: improve explicit_gpu_find device handling
This commit is contained in:
parent
140197f56d
commit
40fe1ce2c7
1 changed files with 4 additions and 4 deletions
|
|
@ -402,11 +402,11 @@ static ssize_t explicit_find_gpus(struct wlr_session *session,
|
|||
break;
|
||||
}
|
||||
|
||||
ret[i] = session_open_if_kms(session, ptr);
|
||||
if (!ret[i]) {
|
||||
wlr_log(WLR_ERROR, "Unable to open %s as DRM device", ptr);
|
||||
struct wlr_device *dev = session_open_if_kms(session, ptr);
|
||||
if (dev) {
|
||||
ret[i++] = dev;
|
||||
} else {
|
||||
++i;
|
||||
wlr_log(WLR_ERROR, "Unable to open %s as DRM device", ptr);
|
||||
}
|
||||
} while ((ptr = strtok_r(NULL, ":", &save)));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue