From 05ee5c21b4ae8e2723b1340886b0b53e408f2a05 Mon Sep 17 00:00:00 2001 From: Jianeng Ceng Date: Thu, 25 Apr 2024 17:24:03 +0800 Subject: [PATCH] acpi: Fix return value in acpi_device_write_dsd_gpio() Fix ++ as suffix and * precedence. After modification, the gpio index can be obtained correctly. The error was introduced in the commit making it public: commit 01344bce BUG=None TEST= Can get the correct index test on nissa. Change-Id: I7a3eb89633aaebebc8bd98ac6126c578fda23839 Signed-off-by: Jianeng Ceng Reviewed-on: https://review.coreboot.org/c/coreboot/+/82088 Reviewed-by: Eric Lai Reviewed-by: Dolan Liu Reviewed-by: Kapil Porwal Tested-by: build bot (Jenkins) --- src/acpi/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/acpi/device.c b/src/acpi/device.c index 091a0865a1..7313639afa 100644 --- a/src/acpi/device.c +++ b/src/acpi/device.c @@ -51,7 +51,7 @@ int acpi_device_write_dsd_gpio(struct acpi_gpio *gpio, int *curr_index) return ret; acpi_device_write_gpio(gpio); - ret = *curr_index++; + ret = (*curr_index)++; return ret; }