Skip to content
Snippets Groups Projects
user avatar
Mattias Jacobsson authored
In the function wmi_dev_match() the variable id is dereferenced without
first performing a NULL check. The variable can for example be NULL if
a WMI driver is registered without specifying the id_table field in
struct wmi_driver.

Add a NULL check and return that the driver can't handle the device if
the variable is NULL.

Fixes: 844af950 ("platform/x86: wmi: Turn WMI into a bus driver")
Signed-off-by: default avatarMattias Jacobsson <2pi@mok.nu>
Signed-off-by: default avatarDarren Hart (VMware) <dvhart@infradead.org>
c355ec65
History
Name Last commit Last update