[PATCH 4/4] drivers/base/devtmpfs.c: fix uninitialized variable

From: Arnaud Lacombe
Date: Thu Jul 21 2011 - 13:16:49 EST


drivers/base/devtmpfs.c: In function 'create_path':
drivers/base/devtmpfs.c:169:6: warning: 'err' may be used uninitialized in this function

Cc: Greg Kroah-Hartman <gregkh@xxxxxxx>
Signed-off-by: Arnaud Lacombe <lacombar@xxxxxxxxx>
---
drivers/base/devtmpfs.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/base/devtmpfs.c b/drivers/base/devtmpfs.c
index 38e6464..256c78a 100644
--- a/drivers/base/devtmpfs.c
+++ b/drivers/base/devtmpfs.c
@@ -166,7 +166,7 @@ static int create_path(const char *nodepath)
{
char *path;
char *s;
- int err;
+ int err = 0;

/* parent directories do not exist, create them */
path = kstrdup(nodepath, GFP_KERNEL);
--
1.7.6.153.g78432

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/