1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-26 22:52:34 +02:00

erasure_layout: Fix double invocation of erasers

Erasefn was invoked over the same block of memory twice.
This patch removes the second redundant invokation. It was
accidentally introduced during earlier refactoring of the code.

Change-Id: I92351eba0fd29114ce98b4a839358e92d176af28
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/77747
Reviewed-by: Alexander Goncharov <chat@joursoir.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
This commit is contained in:
Anastasia Klimchuk 2023-09-10 22:37:00 +10:00 committed by Anastasia Klimchuk
parent 52b794ff26
commit fa8808595a

View File

@ -339,15 +339,6 @@ int erase_write(struct flashctx *const flashctx, chipoff_t region_start, chipoff
}
}
ret = erasefn(flashctx, start_addr, block_len);
if (ret) {
msg_cerr("Failed to execute erase command "
"for offset %#"PRIx32" to %#"PRIx32".\n",
start_addr, start_addr + block_len);
ret = -1;
goto _end;
}
// adjust curcontents
memset(curcontents+start_addr, erased_value, block_len);
// after erase make it unselected again