diff options
Diffstat (limited to 'drivers/base/core.c')
-rw-r--r-- | drivers/base/core.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c index dd40d78a023d..cff4fbfbb055 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -733,11 +733,14 @@ int device_add(struct device *dev) } } - if ((error = device_add_attrs(dev))) + error = device_add_attrs(dev); + if (error) goto AttrsError; - if ((error = device_pm_add(dev))) + error = device_pm_add(dev); + if (error) goto PMError; - if ((error = bus_add_device(dev))) + error = bus_add_device(dev); + if (error) goto BusError; kobject_uevent(&dev->kobj, KOBJ_ADD); bus_attach_device(dev); |