From e2872c002aab87fddae5d39e4af974a59b425e00 Mon Sep 17 00:00:00 2001 From: Laurentiu Mihalcea Date: Tue, 15 Oct 2024 00:40:56 +0300 Subject: [PATCH] drivers: intc: irqstr: initialize 'enabled' variable Initialize the 'enabled' variable before using it. This fixes the following compilation warning: "warning: 'enabled' may be used uninitialized [-Wmaybe-uninitialized]" issued when compiling with `CONFIG_DEBUG` enabled. Signed-off-by: Laurentiu Mihalcea Tested-by: Daniel Baluta --- drivers/interrupt_controller/intc_nxp_irqsteer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/interrupt_controller/intc_nxp_irqsteer.c b/drivers/interrupt_controller/intc_nxp_irqsteer.c index 5d291083fca..02c310dfbe6 100644 --- a/drivers/interrupt_controller/intc_nxp_irqsteer.c +++ b/drivers/interrupt_controller/intc_nxp_irqsteer.c @@ -518,6 +518,7 @@ int z_soc_irq_is_enabled(unsigned int irq) } parent_irq = irq_parent_level_2(irq); + enabled = false; /* find dispatcher responsible for this interrupt */ for (i = 0; i < ARRAY_SIZE(dispatchers); i++) {