linux-stable/drivers/platform
Mattias Jacobsson 02c0351094 platform/x86: wmi: fix potential null pointer dereference
[ Upstream commit c355ec651a ]

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: 844af950da ("platform/x86: wmi: Turn WMI into a bus driver")
Signed-off-by: Mattias Jacobsson <2pi@mok.nu>
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-01-27 14:50:27 +01:00
..
chrome platform/chrome: cros_ec_proto: check for NULL transfer function 2019-06-15 11:54:08 +02:00
goldfish platform: goldfish: Retire pdev_bus 2018-08-02 10:24:51 +02:00
mellanox platform/mellanox: mlxreg-hotplug: Add devm_free_irq call to remove flow 2019-07-10 09:53:38 +02:00
mips MIPS: Loongson: Add Loongson-3A R3.1 basic support 2018-07-23 17:53:34 -07:00
olpc
x86 platform/x86: wmi: fix potential null pointer dereference 2020-01-27 14:50:27 +01:00
Kconfig platform/x86: Move Mellanox platform hotplug driver to platform/mellanox 2018-01-31 10:36:48 -08:00
Makefile platform/x86: Move Mellanox platform hotplug driver to platform/mellanox 2018-01-31 10:36:48 -08:00