Skip to content

Commit 229c257

Browse files
niedzwiecki-dawidkartben
authored andcommitted
tests: drivers: flash: stm32: fix uninitialized variable
Make sure not to accidentally enable WP by uninitialized variable during FLASH_STM32_EX_OP_SECTOR_WP call. Signed-off-by: Dawid Niedzwiecki <[email protected]>
1 parent 86adcb6 commit 229c257

File tree

1 file changed

+1
-0
lines changed
  • tests/drivers/flash/stm32/src

1 file changed

+1
-0
lines changed

tests/drivers/flash/stm32/src/main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ static void *flash_stm32_setup(void)
8181
if (wp_status.protected_mask & sector_mask) {
8282
TC_PRINT("Removing write protection\n");
8383
wp_request.disable_mask = sector_mask;
84+
wp_request.enable_mask = 0;
8485

8586
rc = flash_ex_op(flash_dev, FLASH_STM32_EX_OP_SECTOR_WP,
8687
(uintptr_t)&wp_request, NULL);

0 commit comments

Comments
 (0)