]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mei: vsc: Fix wrong invocation of ACPI SID method
authorHans de Goede <hdegoede@redhat.com>
Mon, 3 Jun 2024 20:50:50 +0000 (22:50 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Jun 2024 12:40:39 +0000 (14:40 +0200)
commit88589d4cb0274be6d93b101d2b6227fffe493e13
treeca15b62d04e76fc484d9d785bc531e5993dc52e6
parent24bff7f714bdff97c2a75a0ff6a368cdf8ad5af4
mei: vsc: Fix wrong invocation of ACPI SID method

[ Upstream commit af076156ec6d70332f1555754e99d4a3771ec297 ]

When using an initializer for a union only one of the union members
must be initialized. The initializer for the acpi_object union variable
passed as argument to the SID ACPI method was initializing both
the type and the integer members of the union.

Unfortunately rather then complaining about this gcc simply ignores
the first initializer and only used the second integer.value = 1
initializer. Leaving type set to 0 which leads to the argument being
skipped by acpi acpi_ns_evaluate() resulting in:

ACPI Warning: \_SB.PC00.SPI1.SPFD.CVFD.SID: Insufficient arguments -
Caller passed 0, method requires 1 (20240322/nsarguments-232)

Fix this by initializing only the integer struct part of the union
and initializing both members of the integer struct.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Fixes: 566f5ca97680 ("mei: Add transport driver for IVSC device")
Reviewed-by: Wentong Wu <wentong.wu@intel.com>
Link: https://lore.kernel.org/r/20240603205050.505389-1-hdegoede@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/misc/mei/vsc-fw-loader.c