Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 94777e09 authored by Eric W. Biederman's avatar Eric W. Biederman Committed by Greg Kroah-Hartman
Browse files

sysfs: In sysfs_lookup don't open code sysfs_find_dirent



This is a small cleanup patch that makes the code just
a little bit cleaner.

Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 7d0c7d67
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -756,9 +756,7 @@ static struct dentry * sysfs_lookup(struct inode *dir, struct dentry *dentry,

	mutex_lock(&sysfs_mutex);

	for (sd = parent_sd->s_children; sd; sd = sd->s_sibling)
		if (sysfs_type(sd) && !strcmp(sd->s_name, dentry->d_name.name))
			break;
	sd = sysfs_find_dirent(parent_sd, dentry->d_name.name);

	/* no such entry */
	if (!sd)