diff --git a/src/shared/dev-setup.c b/src/shared/dev-setup.c index 7641909c1b2..6e57e2a99d3 100644 --- a/src/shared/dev-setup.c +++ b/src/shared/dev-setup.c @@ -107,8 +107,8 @@ int make_inaccessible_nodes( else r = mknod_label(path, table[i].mode, makedev(0, 0)); if (r < 0) { - if (errno != EEXIST) - log_debug_errno(errno, "Failed to create '%s', ignoring: %m", path); + if (r != -EEXIST) + log_debug_errno(r, "Failed to create '%s', ignoring: %m", path); continue; }