summaryrefslogtreecommitdiffstats
path: root/fs/proc
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2012-01-31 05:09:33 +0100
committerEric W. Biederman <ebiederm@xmission.com>2012-02-02 04:20:30 +0100
commit51f72f4a0f92e4abde33a8bca0fac9667575d035 (patch)
treedfa47c429fb4848ee949ea884e86caea05ded162 /fs/proc
parentsysctl: fix memset parameters in setup_sysctl_set() (diff)
downloadlinux-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')
-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,
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,