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

Commit a7a04754 authored by Tejun Heo's avatar Tejun Heo Committed by Greg Kroah-Hartman
Browse files

sysfs: cosmetic changes in sysfs_lookup()



* remove space between * and symbol name in variable declaration.

* kill unnecessary new line.

* kill 'found' and test 'sd' instead.

Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
Acked-by: default avatarCornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 90bc6135
Loading
Loading
Loading
Loading
+5 −10
Original line number Original line Diff line number Diff line
@@ -760,20 +760,15 @@ static struct dentry * sysfs_lookup(struct inode *dir, struct dentry *dentry,
	struct sysfs_dirent *sd;
	struct sysfs_dirent *sd;
	struct bin_attribute *bin_attr;
	struct bin_attribute *bin_attr;
	struct inode *inode;
	struct inode *inode;
	int found = 0;


	mutex_lock(&sysfs_mutex);
	mutex_lock(&sysfs_mutex);


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


	/* no such entry */
	/* no such entry */
	if (!found)
	if (!sd)
		goto out_unlock;
		goto out_unlock;


	/* attach dentry and inode */
	/* attach dentry and inode */