summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libsystemd-bus/bus-kernel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd-bus/bus-kernel.c b/src/libsystemd-bus/bus-kernel.c
index 65b8b7b961..b53c5eddcb 100644
--- a/src/libsystemd-bus/bus-kernel.c
+++ b/src/libsystemd-bus/bus-kernel.c
@@ -175,7 +175,7 @@ int bus_kernel_connect(sd_bus *b) {
assert(b->kernel);
b->input_fd = open(b->kernel, O_RDWR|O_NOCTTY|O_CLOEXEC);
- if (b->input_fd)
+ if (b->input_fd < 0)
return -errno;
b->output_fd = b->input_fd;