From 9ae9ee7ec43418e70ce111e5ad5a9415c8d507ae Mon Sep 17 00:00:00 2001 From: Andrew Sonzogni Date: Thu, 14 Sep 2023 10:14:57 +0200 Subject: [PATCH] drivers: flash: stm32: change undefined variable causing build error Replace an undefined variable. Signed-off-by: Andrew Sonzogni --- drivers/flash/flash_stm32g0x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/flash/flash_stm32g0x.c b/drivers/flash/flash_stm32g0x.c index 07eea9ce32b..41a0e1da3bf 100644 --- a/drivers/flash/flash_stm32g0x.c +++ b/drivers/flash/flash_stm32g0x.c @@ -231,7 +231,7 @@ int flash_stm32_check_configuration(void) { #if defined(STM32G0_DBANK_SUPPORT) && (CONFIG_FLASH_SIZE == 256) /* Single bank mode not supported on dual bank SoCs with 256kiB flash */ - if ((regs->OPTR & FLASH_OPTR_DUAL_BANK) == 0) { + if ((FLASH->OPTR & FLASH_OPTR_DUAL_BANK) == 0) { LOG_ERR("Single bank configuration not supported by the driver"); return -ENOTSUP; }