diff options
Diffstat (limited to 'drivers/platform/x86/wmi.c')
-rw-r--r-- | drivers/platform/x86/wmi.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c index c10546c7e17..a134c26870b 100644 --- a/drivers/platform/x86/wmi.c +++ b/drivers/platform/x86/wmi.c | |||
@@ -755,9 +755,13 @@ static void wmi_free_devices(void) | |||
755 | struct wmi_block *wblock, *next; | 755 | struct wmi_block *wblock, *next; |
756 | 756 | ||
757 | /* Delete devices for all the GUIDs */ | 757 | /* Delete devices for all the GUIDs */ |
758 | list_for_each_entry_safe(wblock, next, &wmi_block_list, list) | 758 | list_for_each_entry_safe(wblock, next, &wmi_block_list, list) { |
759 | list_del(&wblock->list); | ||
759 | if (wblock->dev.class) | 760 | if (wblock->dev.class) |
760 | device_unregister(&wblock->dev); | 761 | device_unregister(&wblock->dev); |
762 | else | ||
763 | kfree(wblock); | ||
764 | } | ||
761 | } | 765 | } |
762 | 766 | ||
763 | static bool guid_already_parsed(const char *guid_string) | 767 | static bool guid_already_parsed(const char *guid_string) |