nordic/hal_flash: Fix for coverity issue 174066
Flash routine returning incorrect error code if flash not ready.
@@ -150,7 +150,7 @@ nrf52k_flash_write(const struct hal_flash *dev, uint32_t address,
}
rc = 0;
if (nrf52k_flash_wait_ready()) {
- goto out;
+ rc = -1;
}
out:
NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Ren;
