1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-22 14:28:07 +00:00

flash_otp_write: uninitialized variable

This commit is contained in:
mcudev 2017-09-30 14:20:33 -04:00 committed by Pavol Rusnak
parent 4f11f46d07
commit 430117dd16

View File

@ -112,7 +112,7 @@ bool flash_otp_write(uint8_t block, uint8_t offset, const uint8_t *data, uint8_t
if (!flash_unlock()) {
return false;
}
bool ret;
bool ret = false;
for (uint8_t i = 0; i < datalen; i++) {
ret = flash_write_byte(FLASH_OTP_BASE + block * FLASH_OTP_BLOCK_SIZE + offset + i, data[i]);
if (!ret) {