assert_se(streq(syspath, val));
dev = sd_device_unref(dev);
- _cleanup_close_ int fd = -1;
+ _cleanup_close_ int fd = -EBADF;
fd = sd_device_open(d, O_CLOEXEC| O_NONBLOCK | (is_block ? O_RDONLY : O_NOCTTY | O_PATH));
assert_se(fd >= 0 || ERRNO_IS_PRIVILEGE(fd));
} else