drivers: flash: stm32h7: do not unlock CR at the end of init

Do not unlock CR at the end of initialization.

The lock mechanism is to protect unwanted registers modifications due to
software bugs. There is no point in leaving the registers unlock once
the driver is initialized.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
This commit is contained in:
Dawid Niedzwiecki 2024-12-20 10:37:29 +01:00 committed by Benjamin Cabé
parent 7405a25b58
commit 8aa4aa7edf

View file

@ -767,7 +767,7 @@ static int stm32h7_flash_init(const struct device *dev)
}
#endif
return flash_stm32h7_write_protection(dev, false);
return 0;
}
DEVICE_DT_INST_DEFINE(0, stm32h7_flash_init, NULL, &flash_data, NULL, POST_KERNEL,