diff --git a/drivers/base/core.c b/drivers/base/core.c
index 6bee6af8d8e1d74b574640e44013c2ccf7c51bd2..0d3c29d7221512fcbf6715b15f8c29be5cf9cc95 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: