From e1909eea5c4dcf2f67c63d13c2bb74e10d2ba8a2 Mon Sep 17 00:00:00 2001 From: Jacob Garber Date: Tue, 14 May 2019 16:14:57 -0600 Subject: soc/intel/skylake: Correct GPIO pointer assignment We need to store the acpi_gpio struct, not save its address. Found-by: Clang Static Analyzer Signed-off-by: Jacob Garber Change-Id: I41c8bf10ce72bec736da97ccc33f9ada49804dc1 Reviewed-on: https://review.coreboot.org/c/coreboot/+/32797 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- src/soc/intel/skylake/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/soc/intel') diff --git a/src/soc/intel/skylake/sd.c b/src/soc/intel/skylake/sd.c index 12c6abe4fd..571d3e7b44 100644 --- a/src/soc/intel/skylake/sd.c +++ b/src/soc/intel/skylake/sd.c @@ -35,7 +35,7 @@ int sd_fill_soc_gpio_info(struct acpi_gpio* gpio, struct device *dev) gpio->pin_count = 1; gpio->pins[0] = config->sdcard_cd_gpio_default; } else - gpio = &config->sdcard_cd_gpio; + *gpio = config->sdcard_cd_gpio; return 0; } -- cgit v1.2.3