dect
/
linux-2.6
Archived
13
0
Fork 0

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>
This commit is contained in:
Eric W. Biederman 2012-01-30 20:09:33 -08:00
parent 1347440db6
commit 51f72f4a0f
1 changed files with 3 additions and 3 deletions

View File

@ -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,