[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1335537062-7627-1-git-send-email-sasikanth.v19@gmail.com>
Date: Fri, 27 Apr 2012 20:01:02 +0530
From: Sasikantha babu <sasikanth.v19@...il.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-kernel@...r.kernel.org,
Sasikantha babu <sasikanth.v19@...il.com>
Subject: [PATCH] sysfs: Redundant assignment of dup_name in sysfs_rename
It is redundant to assign "kstrdup" of "new_value" to "dup_name",
Since we are overwriting "dup_name" with "sd->s_name"
Signed-off-by: Sasikantha babu <sasikanth.v19@...il.com>
---
fs/sysfs/dir.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
index 35a36d3..4abd424 100644
--- a/fs/sysfs/dir.c
+++ b/fs/sysfs/dir.c
@@ -875,7 +875,7 @@ int sysfs_rename(struct sysfs_dirent *sd,
/* rename sysfs_dirent */
if (strcmp(sd->s_name, new_name) != 0) {
error = -ENOMEM;
- new_name = dup_name = kstrdup(new_name, GFP_KERNEL);
+ new_name = kstrdup(new_name, GFP_KERNEL);
if (!new_name)
goto out;
--
1.7.3.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists