aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc
diff options
context:
space:
mode:
Diffstat (limited to 'fs/proc')
-rw-r--r--fs/proc/proc_sysctl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
index 27e265ba1afe..ebe8b3076db7 100644
--- a/fs/proc/proc_sysctl.c
+++ b/fs/proc/proc_sysctl.c
@@ -833,9 +833,9 @@ static struct ctl_dir *find_subdir(struct ctl_dir *dir,
833 entry = find_entry(&head, dir, name, namelen); 833 entry = find_entry(&head, dir, name, namelen);
834 if (!entry) 834 if (!entry)
835 return ERR_PTR(-ENOENT); 835 return ERR_PTR(-ENOENT);
836 if (S_ISDIR(entry->mode)) 836 if (!S_ISDIR(entry->mode))
837 return container_of(head, struct ctl_dir, header); 837 return ERR_PTR(-ENOTDIR);
838 return ERR_PTR(-ENOTDIR); 838 return container_of(head, struct ctl_dir, header);
839} 839}
840 840
841static struct ctl_dir *new_dir(struct ctl_table_set *set, 841static struct ctl_dir *new_dir(struct ctl_table_set *set,