Skip to content

Commit 964040b

Browse files
committed
More erroneous else statements
1 parent 8b6587a commit 964040b

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

supervisor/shared/external_flash/external_flash.c

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,12 @@ static bool wait_for_flash_ready(void) {
6262
if (flash_device->no_ready_bit){
6363
// For NVM without a ready bit in status register
6464
return ok;
65-
} else {
66-
uint8_t read_status_response[1] = {0x00};
67-
do {
68-
ok = spi_flash_read_command(CMD_READ_STATUS, read_status_response, 1);
69-
} while (ok && (read_status_response[0] & 0x3) != 0);
70-
return ok;
7165
}
66+
uint8_t read_status_response[1] = {0x00};
67+
do {
68+
ok = spi_flash_read_command(CMD_READ_STATUS, read_status_response, 1);
69+
} while (ok && (read_status_response[0] & 0x3) != 0);
70+
return ok;
7271
}
7372

7473
// Turn on the write enable bit so we can program and erase the flash.
@@ -171,10 +170,9 @@ static bool erase_sector(uint32_t sector_address) {
171170
}
172171
if (flash_device->no_erase_cmd) {
173172
return true;
174-
} else {
173+
}
175174
spi_flash_sector_command(CMD_SECTOR_ERASE, sector_address);
176175
return true;
177-
}
178176
}
179177

180178
// Sector is really 24 bits.

0 commit comments

Comments
 (0)