mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 02:24:24 +02:00
ACPI: bus: Bail out if acpi_kobj registration fails
The ACPI sysfs code will fail to initialize if acpi_kobj is NULL, together with some ACPI drivers. Follow the other firmware subsystems and bail out if the kobject cannot be registered. Signed-off-by: Armin Wolf <W_Armin@gmx.de> Link: https://patch.msgid.link/20250518185111.3560-2-W_Armin@gmx.de Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
a5806cd506
commit
94a370fc8d
|
|
@ -1446,8 +1446,10 @@ static int __init acpi_init(void)
|
|||
}
|
||||
|
||||
acpi_kobj = kobject_create_and_add("acpi", firmware_kobj);
|
||||
if (!acpi_kobj)
|
||||
pr_debug("%s: kset create error\n", __func__);
|
||||
if (!acpi_kobj) {
|
||||
pr_err("Failed to register kobject\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
init_prmt();
|
||||
acpi_init_pcc();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user