diff --git a/tests/drivers/fprotect/negative/src/main.c b/tests/drivers/fprotect/negative/src/main.c index 3524286139f1..7c06db4d2d54 100644 --- a/tests/drivers/fprotect/negative/src/main.c +++ b/tests/drivers/fprotect/negative/src/main.c @@ -47,7 +47,6 @@ static void flash_write_protected_fails(uint32_t addr, bool backup) err = flash_read(flash_dev, addr, read_buf, sizeof(read_buf)); zassert_equal(0, err, "flash_read() failed: %d.\n", err); } - (void) flash_write_protection_set(flash_dev, false); printk("NOTE: A BUS FAULT immediately after this message" " means the test passed!\n"); zassert_equal(expected_fatal, actual_fatal, "An unexpected fatal error has occurred.\n"); diff --git a/tests/drivers/fprotect/positive/src/main.c b/tests/drivers/fprotect/positive/src/main.c index 72732393bd68..5d552d68a343 100644 --- a/tests/drivers/fprotect/positive/src/main.c +++ b/tests/drivers/fprotect/positive/src/main.c @@ -31,7 +31,6 @@ static void test_flash_write(void) ARRAY_SIZE(read_data_before)); zassert_true(retval == 0, "flash_read failed"); - (void) flash_write_protection_set(flash_dev, false); retval = flash_write(flash_dev, valid_write_addr, write_data, ARRAY_SIZE(write_data)); zassert_true(retval == 0, "flash_write failed"); diff --git a/tests/subsys/fw_info/src/main.c b/tests/subsys/fw_info/src/main.c index e98ed89b9e57..986541be7b13 100644 --- a/tests/subsys/fw_info/src/main.c +++ b/tests/subsys/fw_info/src/main.c @@ -34,7 +34,6 @@ void test_fw_info_invalidate(void) int ret; const struct device *flash_dev = device_get_binding(PM_S0_DEV_NAME); - (void) flash_write_protection_set(flash_dev, false); /* Write a dummy upgrade to S1 */ if (!fw_info_check(S1_ADDRESS)) { diff --git a/tests/subsys/net/lib/fota_download/src/main.c b/tests/subsys/net/lib/fota_download/src/main.c index 0cf2c50ac149..0e27b0ccd6db 100644 --- a/tests/subsys/net/lib/fota_download/src/main.c +++ b/tests/subsys/net/lib/fota_download/src/main.c @@ -155,9 +155,6 @@ void set_s0_active(bool s0_active) err = flash_erase(fdev, PM_S1_ADDRESS, nrfx_nvmc_flash_page_size_get()); zassert_equal(err, 0, "flash_erase failed"); - err = flash_write_protection_set(fdev, false); - zassert_equal(err, 0, "Disabling flash protection failed"); - err = flash_write(fdev, PM_S0_ADDRESS, (void *)&s0_info, sizeof(s0_info)); zassert_equal(err, 0, "Unable to write to flash"); @@ -165,9 +162,6 @@ void set_s0_active(bool s0_active) err = flash_write(fdev, PM_S1_ADDRESS, (void *)&s1_info, sizeof(s1_info)); zassert_equal(err, 0, "Unable to write to flash"); - - err = flash_write_protection_set(fdev, true); - zassert_equal(err, 0, "Enabling flash protection failed"); } #endif