From ad72956df2ce83f58be1dc4e503c78c28e414c2c Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Wed, 28 Oct 2009 19:51:37 +0100 Subject: [PATCH] Driver Core: devtmpfs: cleanup node on device creation error Signed-off-by: Kay Sievers Signed-off-by: Greg Kroah-Hartman --- drivers/base/core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/base/core.c b/drivers/base/core.c index 6bee6af8d8e1..0d3c29d72215 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -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: