summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--udev-add.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/udev-add.c b/udev-add.c
index c28256a5a6..9562cb5dbb 100644
--- a/udev-add.c
+++ b/udev-add.c
@@ -226,10 +226,11 @@ static int create_node(struct udevice *dev, int fake)
if (endptr[0] == '\0')
uid = (uid_t) id;
else {
+ struct passwd *pw;
if (strncmp(dev->owner, LOCAL_USER, sizeof(LOCAL_USER)) == 0)
set_to_local_user(dev->owner);
- struct passwd *pw = getpwnam(dev->owner);
+ pw = getpwnam(dev->owner);
if (pw == NULL)
dbg("specified user unknown '%s'", dev->owner);
else