diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2012-01-31 05:09:33 +0100 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2012-02-02 04:20:30 +0100 |
commit | 51f72f4a0f92e4abde33a8bca0fac9667575d035 (patch) | |
tree | dfa47c429fb4848ee949ea884e86caea05ded162 /fs/proc/proc_sysctl.c | |
parent | sysctl: fix memset parameters in setup_sysctl_set() (diff) | |
download | linux-51f72f4a0f92e4abde33a8bca0fac9667575d035.tar.xz linux-51f72f4a0f92e4abde33a8bca0fac9667575d035.zip |
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.c | 6 |
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, entry = find_entry(&head, dir, name, namelen); if (!entry) return ERR_PTR(-ENOENT); - if (S_ISDIR(entry->mode)) - return container_of(head, struct ctl_dir, header); - return ERR_PTR(-ENOTDIR); + if (!S_ISDIR(entry->mode)) + return ERR_PTR(-ENOTDIR); + return container_of(head, struct ctl_dir, header); } static struct ctl_dir *new_dir(struct ctl_table_set *set, |