X-Git-Url: http://git.samba.org/samba.git/?p=sfrench%2Fcifs-2.6.git;a=blobdiff_plain;f=drivers%2Facpi%2Fbus.c;h=af74b420ec833997b710c1cbd628da7c6bfa34c6;hp=5a6fbe0fcaf2b82db279c40bd031abac2b4b6125;hb=2931dc7d9daf7addc10a126aedf1e630a1a05b49;hpb=088737f44bbf6378745f5b57b035e57ee3dc4750 diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index 5a6fbe0fcaf2..af74b420ec83 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c @@ -409,11 +409,15 @@ static void acpi_bus_notify(acpi_handle handle, u32 type, void *data) (driver->flags & ACPI_DRIVER_ALL_NOTIFY_EVENTS)) driver->ops.notify(adev, type); - if (hotplug_event && ACPI_SUCCESS(acpi_hotplug_schedule(adev, type))) + if (!hotplug_event) { + acpi_bus_put_acpi_device(adev); + return; + } + + if (ACPI_SUCCESS(acpi_hotplug_schedule(adev, type))) return; acpi_bus_put_acpi_device(adev); - return; err: acpi_evaluate_ost(handle, type, ost_code, NULL);