Skip to content

Commit af07615

Browse files
jwrdegoedegregkh
authored andcommitted
mei: vsc: Fix wrong invocation of ACPI SID method
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 <[email protected]> Reviewed-by: Sakari Ailus <[email protected]> Fixes: 566f5ca ("mei: Add transport driver for IVSC device") Reviewed-by: Wentong Wu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 9b5e045 commit af07615

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/misc/mei/vsc-fw-loader.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ static int vsc_get_sensor_name(struct vsc_fw_loader *fw_loader,
252252
{
253253
struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER };
254254
union acpi_object obj = {
255-
.type = ACPI_TYPE_INTEGER,
255+
.integer.type = ACPI_TYPE_INTEGER,
256256
.integer.value = 1,
257257
};
258258
struct acpi_object_list arg_list = {

0 commit comments

Comments
 (0)