summaryrefslogtreecommitdiffstats
path: root/kernel/fs/proc/proc_sysctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/fs/proc/proc_sysctl.c')
-rw-r--r--kernel/fs/proc/proc_sysctl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/fs/proc/proc_sysctl.c b/kernel/fs/proc/proc_sysctl.c
index fe5b6e6c4..4dbe1e2da 100644
--- a/kernel/fs/proc/proc_sysctl.c
+++ b/kernel/fs/proc/proc_sysctl.c
@@ -703,7 +703,7 @@ static int proc_sys_readdir(struct file *file, struct dir_context *ctx)
ctl_dir = container_of(head, struct ctl_dir, header);
if (!dir_emit_dots(file, ctx))
- return 0;
+ goto out;
pos = 2;
@@ -713,6 +713,7 @@ static int proc_sys_readdir(struct file *file, struct dir_context *ctx)
break;
}
}
+out:
sysctl_head_finish(head);
return 0;
}