Commit 023b9565 authored by Dmitry Torokhov's avatar Dmitry Torokhov Committed by Matthew Garrett

WMI: properly cleanup devices to avoid crashes

We need to remove devices that we destroy from the list, otherwise
we'll crash if there are more than one "_WDG" methods in DSDT.

This fixes default avatarIlya Tumaykin <>
Signed-off-by: default avatarDmitry Torokhov <>
Acked-by: default avatarCarlos Corbacho <>
Signed-off-by: default avatarMatthew Garrett <>
parent 349d594b
......@@ -754,9 +754,13 @@ static void wmi_free_devices(void)
struct wmi_block *wblock, *next;
/* Delete devices for all the GUIDs */
list_for_each_entry_safe(wblock, next, &wmi_block_list, list)
list_for_each_entry_safe(wblock, next, &wmi_block_list, list) {
if (wblock->dev.class)
static bool guid_already_parsed(const char *guid_string)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment