summaryrefslogtreecommitdiff
path: root/src/login/logind-core.c
diff options
context:
space:
mode:
authorMantas Mikulėnas <grawity@gmail.com>2014-03-11 17:49:00 +0200
committerLennart Poettering <lennart@poettering.net>2014-03-11 17:45:24 +0100
commit94036de887ad5b0dc805abe38b5c1c58b57d9465 (patch)
tree47ecc04e64f5a59f8bb17ef4a4a9fcafa1e5b5f8 /src/login/logind-core.c
parent4de82926892eb1636d0a25cf1e4ab15cab6a6099 (diff)
logind: Do not fail display count if a device has no parent
udev_device_get_parent() may return NULL when the device doesn't have a parent, as is the case with (for example) /sys/devices/virtual/drm/ttm. Also, log an actual error message instead of "-12 displays connected".
Diffstat (limited to 'src/login/logind-core.c')
-rw-r--r--src/login/logind-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/login/logind-core.c b/src/login/logind-core.c
index ca34d378ff..053d2ed63e 100644
--- a/src/login/logind-core.c
+++ b/src/login/logind-core.c
@@ -520,7 +520,7 @@ int manager_count_displays(Manager *m) {
p = udev_device_get_parent(d);
if (!p)
- return -ENOMEM;
+ continue;
/* If the parent shares the same subsystem as the
* device we are looking at then it is a connector,