aboutsummaryrefslogtreecommitdiff
path: root/fs/proc
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2012-01-30 20:09:33 -0800
committerEric W. Biederman <ebiederm@xmission.com>2012-02-01 19:20:30 -0800
commit51f72f4a0f92e4abde33a8bca0fac9667575d035 (patch)
treedfa47c429fb4848ee949ea884e86caea05ded162 /fs/proc
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')
-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 27e265ba1af..ebe8b3076db 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,