diff options
Diffstat (limited to 'udev-add.c')
-rw-r--r-- | udev-add.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/udev-add.c b/udev-add.c index 4aff06e15f..6dfd059105 100644 --- a/udev-add.c +++ b/udev-add.c @@ -393,6 +393,7 @@ static int rename_net_if(struct udevice *dev) retval = ioctl(sk, SIOCSIFNAME, &ifr); if (retval != 0) dbg("error changing net interface name"); + close(sk); return retval; } @@ -453,6 +454,8 @@ int udev_add_device(char *path, char *subsystem, int fake) case 'b': case 'c': retval = create_node(&dev, fake); + if ((retval == 0) && (!fake)) + dev_d_send(&dev, subsystem); break; case 'n': @@ -462,9 +465,6 @@ int udev_add_device(char *path, char *subsystem, int fake) break; } - if ((retval == 0) && (!fake)) - dev_d_send(&dev, subsystem); - exit: if (class_dev) sysfs_close_class_device(class_dev); |