Anastasia Klimchuk submitted this change.

View Change

Approvals: Peter Marheine: Looks good to me, approved build bot (Jenkins): Verified Alexander Goncharov: Looks good to me, approved
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>
---
M erasure_layout.c
1 file changed, 0 insertions(+), 9 deletions(-)

diff --git a/erasure_layout.c b/erasure_layout.c
index c9ac44b..b43e52e 100644
--- a/erasure_layout.c
+++ b/erasure_layout.c
@@ -339,15 +339,6 @@
}
}

- 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

To view, visit change 77747. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: I92351eba0fd29114ce98b4a839358e92d176af28
Gerrit-Change-Number: 77747
Gerrit-PatchSet: 8
Gerrit-Owner: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-Reviewer: Aarya <aarya.chaumal@gmail.com>
Gerrit-Reviewer: Alexander Goncharov <chat@joursoir.net>
Gerrit-Reviewer: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Reviewer: Peter Marheine <pmarheine@chromium.org>
Gerrit-Reviewer: Sam McNally <sammc@google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Stefan Reinauer <stefan.reinauer@coreboot.org>
Gerrit-MessageType: merged