Commit 899587c8 authored by Christoph Hellwig's avatar Christoph Hellwig

configfs: simplify the configfs_dirent_is_ready

Return the error directly instead of using a goto.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 417b962d
...@@ -467,9 +467,8 @@ static struct dentry * configfs_lookup(struct inode *dir, ...@@ -467,9 +467,8 @@ static struct dentry * configfs_lookup(struct inode *dir,
* not complete their initialization, since the dentries of the * not complete their initialization, since the dentries of the
* attributes won't be instantiated. * attributes won't be instantiated.
*/ */
err = -ENOENT;
if (!configfs_dirent_is_ready(parent_sd)) if (!configfs_dirent_is_ready(parent_sd))
goto out; return ERR_PTR(-ENOENT);
list_for_each_entry(sd, &parent_sd->s_children, s_sibling) { list_for_each_entry(sd, &parent_sd->s_children, s_sibling) {
if (sd->s_type & CONFIGFS_NOT_PINNED) { if (sd->s_type & CONFIGFS_NOT_PINNED) {
...@@ -493,7 +492,6 @@ static struct dentry * configfs_lookup(struct inode *dir, ...@@ -493,7 +492,6 @@ static struct dentry * configfs_lookup(struct inode *dir,
return NULL; return NULL;
} }
out:
return ERR_PTR(err); return ERR_PTR(err);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment