Skip to content

Commit

Permalink
Revert "flash: at91samd: fix use of is_erased in check"
Browse files Browse the repository at this point in the history
This reverts commit 08607ae.
  • Loading branch information
cmaglie committed Jun 10, 2015
1 parent cb18cea commit d4b7679
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/flash/nor/at91samd.c
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ static int samd_erase(struct flash_bank *bank, int first, int last)
return ERROR_FLASH_OPERATION_FAILED;
}

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

0 comments on commit d4b7679

Please sign in to comment.