Skip to content

Commit

Permalink
drivers: flash: stm32h7: do not unlock CR at the end of init
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
niedzwiecki-dawid authored and kartben committed Jan 6, 2025
1 parent 7405a25 commit 8aa4aa7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/flash/flash_stm32h7x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 8aa4aa7

Please sign in to comment.