summaryrefslogtreecommitdiff
path: root/drivers/base/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base/core.c')
-rw-r--r--drivers/base/core.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 4fc6f27641bf..f9297c68214a 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -3602,9 +3602,7 @@ int device_add(struct device *dev)
if (error)
goto SysEntryError;
- error = devtmpfs_create_node(dev);
- if (error)
- goto DevtmpfsError;
+ devtmpfs_create_node(dev);
}
/* Notify clients of device addition. This call must come
@@ -3660,8 +3658,6 @@ int device_add(struct device *dev)
done:
put_device(dev);
return error;
- DevtmpfsError:
- device_remove_sys_dev_entry(dev);
SysEntryError:
if (MAJOR(dev->devt))
device_remove_file(dev, &dev_attr_dev);