summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarthikeyan Ramasubramanian <kramasub@google.com>2021-07-02 14:35:41 -0600
committerPatrick Georgi <pgeorgi@google.com>2021-07-05 10:50:24 +0000
commitbb87552c98ae2419dcf853fe0db97c0895f6894d (patch)
tree6c46beac589a901181fd575040e422a9fdc1b380
parent4693f3dfe907d13359c48751db2014b945ea4d05 (diff)
mb/google/dedede: Fix the pointer/address used in memcpy
The caller is already passing the address to the required LTE reset and enable GPIO. During memcpy, the address to that pointer is used which will lead to copying undefined data. Fix the pointer/address used in memcpy. BUG=None BRANCH=dedede TEST=Build Kracko, Drawcia and Metaknight mainboards which use this function. Change-Id: I79d6d9af03acd59ab5e1cd7df97bf451011dfeaa Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com> Found-by: Coverity CID 1458053, 1458054. Reviewed-on: https://review.coreboot.org/c/coreboot/+/56046 Reviewed-by: Evan Green <evgreen@chromium.org> Reviewed-by: Furquan Shaikh <furquan@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rw-r--r--src/mainboard/google/dedede/variants/baseboard/ramstage.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mainboard/google/dedede/variants/baseboard/ramstage.c b/src/mainboard/google/dedede/variants/baseboard/ramstage.c
index 136fe1354f..aedaa3f656 100644
--- a/src/mainboard/google/dedede/variants/baseboard/ramstage.c
+++ b/src/mainboard/google/dedede/variants/baseboard/ramstage.c
@@ -35,10 +35,10 @@ void update_lte_device(struct acpi_gpio *lte_reset_gpio, struct acpi_gpio *lte_e
config->type = UPC_TYPE_INTERNAL;
if (port->path.usb.port_type == LTE_USB_PORT_TYPE) {
config->has_power_resource = 1;
- memcpy(&config->reset_gpio, &lte_reset_gpio,
+ memcpy(&config->reset_gpio, lte_reset_gpio,
sizeof(config->reset_gpio));
config->reset_off_delay_ms = 20;
- memcpy(&config->enable_gpio, &lte_enable_gpio,
+ memcpy(&config->enable_gpio, lte_enable_gpio,
sizeof(config->enable_gpio));
config->enable_delay_ms = 20;
}