aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/acpi/bus.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 784bda663d16..9d4fea6433f5 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -432,11 +432,15 @@ static void acpi_bus_notify(acpi_handle handle, u32 type, void *data)
432 (driver->flags & ACPI_DRIVER_ALL_NOTIFY_EVENTS)) 432 (driver->flags & ACPI_DRIVER_ALL_NOTIFY_EVENTS))
433 driver->ops.notify(adev, type); 433 driver->ops.notify(adev, type);
434 434
435 if (hotplug_event && ACPI_SUCCESS(acpi_hotplug_schedule(adev, type))) 435 if (!hotplug_event) {
436 acpi_bus_put_acpi_device(adev);
437 return;
438 }
439
440 if (ACPI_SUCCESS(acpi_hotplug_schedule(adev, type)))
436 return; 441 return;
437 442
438 acpi_bus_put_acpi_device(adev); 443 acpi_bus_put_acpi_device(adev);
439 return;
440 444
441 err: 445 err:
442 acpi_evaluate_ost(handle, type, ost_code, NULL); 446 acpi_evaluate_ost(handle, type, ost_code, NULL);