diff options
author | James Morris <james.l.morris@oracle.com> | 2014-04-14 11:23:14 +1000 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2014-04-14 11:23:14 +1000 |
commit | ecd740c6f2f092b90b95fa35f757973589eaaca2 (patch) | |
tree | ce02b1e18c4fc5729699251460cd8be7604d8401 /drivers/base/core.c | |
parent | selinux: correctly label /proc inodes in use before the policy is loaded (diff) | |
parent | Linux 3.14 (diff) | |
download | linux-dev-ecd740c6f2f092b90b95fa35f757973589eaaca2.tar.xz linux-dev-ecd740c6f2f092b90b95fa35f757973589eaaca2.zip |
Merge commit 'v3.14' into next
Diffstat (limited to 'drivers/base/core.c')
-rw-r--r-- | drivers/base/core.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c index 67b180d855b2..2b567177ef78 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -491,11 +491,13 @@ static int device_add_attrs(struct device *dev) if (device_supports_offline(dev) && !dev->offline_disabled) { error = device_create_file(dev, &dev_attr_online); if (error) - goto err_remove_type_groups; + goto err_remove_dev_groups; } return 0; + err_remove_dev_groups: + device_remove_groups(dev, dev->groups); err_remove_type_groups: if (type) device_remove_groups(dev, type->groups); @@ -1603,6 +1605,7 @@ device_create_groups_vargs(struct class *class, struct device *parent, goto error; } + device_initialize(dev); dev->devt = devt; dev->class = class; dev->parent = parent; @@ -1614,7 +1617,7 @@ device_create_groups_vargs(struct class *class, struct device *parent, if (retval) goto error; - retval = device_register(dev); + retval = device_add(dev); if (retval) goto error; |