platform/x86: wmi: Check if event data is not NULL
authorArmin Wolf <W_Armin@gmx.de>
Mon, 19 Feb 2024 11:59:16 +0000 (12:59 +0100)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tue, 27 Feb 2024 12:44:20 +0000 (14:44 +0200)
commit125619112deaf5f7d79b05e268254df3af916d10
tree6bc53759fef51cd9a9801ef93ef7b5e4b9e611f2
parent4f299135d5668f56be270d224d41eb83d2002038
platform/x86: wmi: Check if event data is not NULL

WMI event drivers which do not have no_notify_data set expect
that each WMI event contains valid data. Evaluating _WED however
might return no data, which can cause issues with such drivers.

Fix this by validating that evaluating _WED did return data.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20240219115919.16526-3-W_Armin@gmx.de
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/wmi.c