diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c index ff298a9baa0a564be4a8ea4e030e34c844a8a1df..26bd2004fe35b9486ee8fbe7cdcfb85fb5a10ce4 100644 --- a/fs/configfs/dir.c +++ b/fs/configfs/dir.c @@ -494,9 +494,8 @@ static struct dentry * configfs_lookup(struct inode *dir, * not complete their initialization, since the dentries of the * attributes won't be instantiated. */ - err = -ENOENT; if (!configfs_dirent_is_ready(parent_sd)) - goto out; + return ERR_PTR(-ENOENT); list_for_each_entry(sd, &parent_sd->s_children, s_sibling) { if (sd->s_type & CONFIGFS_NOT_PINNED) { @@ -520,7 +519,6 @@ static struct dentry * configfs_lookup(struct inode *dir, return NULL; } -out: return ERR_PTR(err); }