[PATCH 04/14] sysfs: Remove unnecessary variable found from sysfs_lookup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The subject says it all.

Signed-off-by: Eric W. Biederman <ebiederm@xxxxxxxxxxxx>
---
 fs/sysfs/dir.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
index 834ed74..8430633 100644
--- a/fs/sysfs/dir.c
+++ b/fs/sysfs/dir.c
@@ -748,19 +748,16 @@ static struct dentry * sysfs_lookup(struct inode *dir, struct dentry *dentry,
 	struct dentry *result = NULL;
 	struct sysfs_dirent * sd;
 	struct inode *inode;
-	int found = 0;
 
 	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)) {
-			found = 1;
+		    !strcmp(sd->s_name, dentry->d_name.name))
 			break;
-		}
 	}
 
 	/* no such entry */
-	if (!found)
+	if (!sd)
 		goto out;
 
 	/* attach dentry and inode */
-- 
1.5.1.1.181.g2de0

_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/containers

[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux