logind: fix bad error propagation

This commit is contained in:
Lennart Poettering 2018-08-06 18:21:37 +02:00
parent d88ffeeeef
commit cce08496e7
1 changed files with 1 additions and 1 deletions

View File

@ -175,7 +175,7 @@ static int vt_allocate(unsigned int vtnr) {
xsprintf(p, "/dev/tty%u", vtnr);
fd = open_terminal(p, O_RDWR|O_NOCTTY|O_CLOEXEC);
if (fd < 0)
return -errno;
return fd;
return 0;
}