From: Sasikantha babu <sasikanth.v19@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org, Sasikantha babu <sasikanth.v19@gmail.com>
Subject: [PATCH] sysfs: Redundant assignment of dup_name in sysfs_rename
Date: Fri, 27 Apr 2012 20:01:02 +0530 [thread overview]
Message-ID: <1335537062-7627-1-git-send-email-sasikanth.v19@gmail.com> (raw)
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@gmail.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
next reply other threads:[~2012-04-27 14:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-27 14:31 Sasikantha babu [this message]
2012-04-30 1:55 ` Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1335537062-7627-1-git-send-email-sasikanth.v19@gmail.com \
--to=sasikanth.v19@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®