drivers: flash: stm32: change undefined variable causing build error

Replace an undefined variable.

Signed-off-by: Andrew Sonzogni <andrew@safehear.fr>
This commit is contained in:
Andrew Sonzogni 2023-09-14 10:14:57 +02:00 committed by Carles Cufí
commit 9ae9ee7ec4

View file

@ -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;
}