Skip to content

Commit d4b7679

Browse files
committed
Revert "flash: at91samd: fix use of is_erased in check"
This reverts commit 08607ae.
1 parent cb18cea commit d4b7679

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/flash/nor/at91samd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ static int samd_erase(struct flash_bank *bank, int first, int last)
606606
return ERROR_FLASH_OPERATION_FAILED;
607607
}
608608

609-
if (bank->sectors[s].is_erased != 1) {
609+
if (!bank->sectors[s].is_erased) {
610610
/* For each row in that sector */
611611
for (int r = s * rows_in_sector; r < (s + 1) * rows_in_sector; r++) {
612612
res = samd_erase_row(bank->target, r * chip->page_size * 4);

0 commit comments

Comments
 (0)