aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2013-11-16 03:15:23 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-12-19 13:10:32 -0500
commitfbde7c6119f99a0e316ad1a8fe0788bd76d277b1 (patch)
treec4e59198c2920961869248c0c73b3a7d37b2b80c
parentecfbf6fd9c03be7dfe3eafc3846641b9d463607b (diff)
devtmpfs: Calling delete_path() only when necessary
The deleted variable is always 1 in current code. Initialize deleted variable to be 0, so delete_path() will be called only when necessary. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/base/devtmpfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/devtmpfs.c b/drivers/base/devtmpfs.c
index 0f3820121e02..25798db14553 100644
--- a/drivers/base/devtmpfs.c
+++ b/drivers/base/devtmpfs.c
@@ -299,7 +299,7 @@ static int handle_remove(const char *nodename, struct device *dev)
299{ 299{
300 struct path parent; 300 struct path parent;
301 struct dentry *dentry; 301 struct dentry *dentry;
302 int deleted = 1; 302 int deleted = 0;
303 int err; 303 int err;
304 304
305 dentry = kern_path_locked(nodename, &parent); 305 dentry = kern_path_locked(nodename, &parent);