summaryrefslogtreecommitdiff
path: root/udev-add.c
diff options
context:
space:
mode:
Diffstat (limited to 'udev-add.c')
-rw-r--r--udev-add.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/udev-add.c b/udev-add.c
index 9c54602405..d20e96ee72 100644
--- a/udev-add.c
+++ b/udev-add.c
@@ -74,6 +74,8 @@ static int create_node(struct udevice *dev)
{
char filename[255];
int retval = 0;
+ uid_t uid = 0;
+ gid_t gid = 0;
dev_t res;
strncpy(filename, udev_root, sizeof(filename));
@@ -133,9 +135,6 @@ static int create_node(struct udevice *dev)
dbg("mknod(%s, %#o, %u, %u) failed with error '%s'",
filename, dev->mode, dev->major, dev->minor, strerror(errno));
- uid_t uid = 0;
- gid_t gid = 0;
-
if (*dev->owner) {
char *endptr;
unsigned long id = strtoul(dev->owner, &endptr, 10);