From b5af66cdd8d1636e26093c41c023887456643b84 Mon Sep 17 00:00:00 2001 From: Koen Zandberg Date: Tue, 17 Jan 2023 11:00:30 +0100 Subject: [PATCH] matrix_keypad: Fix memcpy bug in initialization --- drivers/matrix_keypad/matrix_keypad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/matrix_keypad/matrix_keypad.c b/drivers/matrix_keypad/matrix_keypad.c index 10868dc995..079903b18e 100644 --- a/drivers/matrix_keypad/matrix_keypad.c +++ b/drivers/matrix_keypad/matrix_keypad.c @@ -91,7 +91,7 @@ int matrix_keypad_init(matrix_keypad_t *dev, const matrix_keypad_params_t *param (CONFIG_MATRIX_KEYPAD_DEBOUNCE_PATTERN_BEGIN & CONFIG_MATRIX_KEYPAD_DEBOUNCE_PATTERN_END) == 0, "Debounce patterns must not overlap"); memset(dev, 0, sizeof(matrix_keypad_t)); - memcpy(&dev->params, params, sizeof(matrix_keypad_params_t)); + dev->params = params; dev->callback = callback; dev->arg = arg; _setup_columns(dev);