Driver Core: devtmpfs: cleanup node on device creation error
Kay Sievers [Wed, 28 Oct 2009 18:51:37 +0000 (19:51 +0100)]
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

drivers/base/core.c

index 6bee6af..0d3c29d 100644 (file)
@@ -987,6 +987,8 @@ done:
        device_remove_class_symlinks(dev);
  SymlinkError:
        if (MAJOR(dev->devt))
+               devtmpfs_delete_node(dev);
+       if (MAJOR(dev->devt))
                device_remove_sys_dev_entry(dev);
  devtattrError:
        if (MAJOR(dev->devt))