From 1bead0f004741b0f19cb761bf8381714ea252535 Mon Sep 17 00:00:00 2001 From: Bjorn Andersson Date: Sun, 5 Jul 2026 16:50:10 +0000 Subject: [PATCH] drivers: initialize libgpiod v1 request config Ubuntu noble still ships libgpiod 1.x, which selects the local-gpio v1 implementation. That path declared struct gpiod_line_request_config without initializing the whole structure before passing it to libgpiod, leaving padding or future fields undefined under stricter toolchains. Zero-initialize the request configuration before filling the fields cdba uses, matching the defensive style needed for older supported distributions and newer compilers. Signed-off-by: Bjorn Andersson --- drivers/local-gpio-v1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/local-gpio-v1.c b/drivers/local-gpio-v1.c index 793dd1d..657a152 100644 --- a/drivers/local-gpio-v1.c +++ b/drivers/local-gpio-v1.c @@ -25,7 +25,7 @@ int local_gpio_init(struct local_gpio *local_gpio) int i; for (i = 0; i < GPIO_COUNT; ++i) { - struct gpiod_line_request_config cfg; + struct gpiod_line_request_config cfg = { 0 }; if (!local_gpio->options->gpios[i].present) continue;