diff options
author | Jacob Garber <jgarber1@ualberta.ca> | 2019-05-14 16:14:57 -0600 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-05-16 10:02:42 +0000 |
commit | e1909eea5c4dcf2f67c63d13c2bb74e10d2ba8a2 (patch) | |
tree | 2deb47eb52b1607dc42604be69f3f90559d5f45a | |
parent | 6644a75b0e9fec0ba104e5249f238520b6e3f7f6 (diff) |
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 <jgarber1@ualberta.ca>
Change-Id: I41c8bf10ce72bec736da97ccc33f9ada49804dc1
Reviewed-on: https://review.coreboot.org/c/coreboot/+/32797
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
-rw-r--r-- | src/soc/intel/skylake/sd.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |