Driver Core: devtmpfs: cleanup node on device creation error
authorKay Sievers <kay.sievers@vrfy.org>
Wed, 28 Oct 2009 18:51:37 +0000 (19:51 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 11 Dec 2009 19:24:52 +0000 (11:24 -0800)
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/base/core.c

index 6bee6af8d8e1d74b574640e44013c2ccf7c51bd2..0d3c29d7221512fcbf6715b15f8c29be5cf9cc95 100644 (file)
@@ -986,6 +986,8 @@ done:
  AttrsError:
        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: