diff options
Diffstat (limited to 'drivers/acpi/sysfs.c')
-rw-r--r-- | drivers/acpi/sysfs.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c index 05306a59aedc..bb6045c5385b 100644 --- a/drivers/acpi/sysfs.c +++ b/drivers/acpi/sysfs.c | |||
@@ -762,13 +762,8 @@ void acpi_sysfs_add_hotplug_profile(struct acpi_hotplug_profile *hotplug, | |||
762 | if (!hotplug_kobj) | 762 | if (!hotplug_kobj) |
763 | goto err_out; | 763 | goto err_out; |
764 | 764 | ||
765 | kobject_init(&hotplug->kobj, &acpi_hotplug_profile_ktype); | 765 | error = kobject_init_and_add(&hotplug->kobj, |
766 | error = kobject_set_name(&hotplug->kobj, "%s", name); | 766 | &acpi_hotplug_profile_ktype, hotplug_kobj, "%s", name); |
767 | if (error) | ||
768 | goto err_out; | ||
769 | |||
770 | hotplug->kobj.parent = hotplug_kobj; | ||
771 | error = kobject_add(&hotplug->kobj, hotplug_kobj, NULL); | ||
772 | if (error) | 767 | if (error) |
773 | goto err_out; | 768 | goto err_out; |
774 | 769 | ||