summaryrefslogtreecommitdiff
path: root/src/core/automount.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/automount.c')
-rw-r--r--src/core/automount.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/core/automount.c b/src/core/automount.c
index 8814d4c4fe..f795487131 100644
--- a/src/core/automount.c
+++ b/src/core/automount.c
@@ -300,10 +300,8 @@ static int open_dev_autofs(Manager *m) {
label_fix("/dev/autofs", false, false);
m->dev_autofs_fd = open("/dev/autofs", O_CLOEXEC|O_RDONLY);
- if (m->dev_autofs_fd < 0) {
- log_error_errno(errno, "Failed to open /dev/autofs: %m");
- return -errno;
- }
+ if (m->dev_autofs_fd < 0)
+ return log_error_errno(errno, "Failed to open /dev/autofs: %m");
init_autofs_dev_ioctl(&param);
if (ioctl(m->dev_autofs_fd, AUTOFS_DEV_IOCTL_VERSION, &param) < 0) {