Although the system will not in good condition or boot failed if acpi_bus_init() failed, we still need to put the kobject in error patch before return, to make the code right. Signed-off-by: Hanjun Guo <guohanjun@xxxxxxxxxx> --- drivers/acpi/bus.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index f9b5262..008ae29 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c @@ -1330,6 +1330,7 @@ static int __init acpi_init(void) result = acpi_bus_init(); if (result) { + kobject_put(acpi_kobj); disable_acpi(); return result; } -- 1.7.12.4