drivers/flash: stm32: Fix faulty register access

Merge of conflicting PRs lead to compilation issue.
Fix this.

Fixes #22297

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
Erwan Gouriou 2020-01-29 16:34:45 +01:00 committed by Maureen Helm
parent be3cb485eb
commit dbd054fbd3

View File

@ -175,12 +175,12 @@ int flash_stm32_check_status(struct device *dev)
u32_t error = 0;
/* Save Flash errors */
error = (regs->sr & FLASH_FLAG_SR_ERRORS);
error |= (regs->eccr & FLASH_FLAG_ECCC);
error = (regs->SR & FLASH_FLAG_SR_ERRORS);
error |= (regs->ECCR & FLASH_FLAG_ECCC);
/* Clear systematic Option and Enginneering bits validity error */
if (error & FLASH_FLAG_OPTVERR) {
regs->sr |= FLASH_FLAG_SR_ERRORS;
regs->SR |= FLASH_FLAG_SR_ERRORS;
return 0;
}