|
@@ -373,10 +373,11 @@ int acpi_bus_receive_event(struct acpi_bus_event *event)
|
|
|
}
|
|
|
|
|
|
spin_lock_irqsave(&acpi_bus_event_lock, flags);
|
|
|
- entry =
|
|
|
- list_entry(acpi_bus_event_list.next, struct acpi_bus_event, node);
|
|
|
- if (entry)
|
|
|
+ if (!list_empty(&acpi_bus_event_list)) {
|
|
|
+ entry = list_entry(acpi_bus_event_list.next,
|
|
|
+ struct acpi_bus_event, node);
|
|
|
list_del(&entry->node);
|
|
|
+ }
|
|
|
spin_unlock_irqrestore(&acpi_bus_event_lock, flags);
|
|
|
|
|
|
if (!entry)
|