mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-21 03:33:59 +08:00
ACPI / hotplug: Don't set kobject parent pointer explicitly
kobject_add() sets the parent pointer, so we don't need to do it explicitly. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
9b5b067401
commit
cae7127241
@ -764,7 +764,6 @@ void acpi_sysfs_add_hotplug_profile(struct acpi_hotplug_profile *hotplug,
|
|||||||
|
|
||||||
kobject_init(&hotplug->kobj, &acpi_hotplug_profile_ktype);
|
kobject_init(&hotplug->kobj, &acpi_hotplug_profile_ktype);
|
||||||
|
|
||||||
hotplug->kobj.parent = hotplug_kobj;
|
|
||||||
error = kobject_add(&hotplug->kobj, hotplug_kobj, "%s", name);
|
error = kobject_add(&hotplug->kobj, hotplug_kobj, "%s", name);
|
||||||
if (error)
|
if (error)
|
||||||
goto err_out;
|
goto err_out;
|
||||||
|
Loading…
Reference in New Issue
Block a user