aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/proc_sysctl.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2012-01-30 23:09:33 -0500
committerEric W. Biederman <ebiederm@xmission.com>2012-02-01 22:20:30 -0500
commit51f72f4a0f92e4abde33a8bca0fac9667575d035 (patch)
treedfa47c429fb4848ee949ea884e86caea05ded162 /fs/proc/proc_sysctl.c
parent1347440db6f76ec5ae0af8d8558387f571a5e1dd (diff)
sysctl: An easier to read version of find_subdir
Suggested-by: Lucian Adrian Grijincu <lucian.grijincu@gmail.com> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'fs/proc/proc_sysctl.c')
-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,