From fa8808595a0199be06ebf278734524f62fc978ab Mon Sep 17 00:00:00 2001 From: Anastasia Klimchuk Date: Sun, 10 Sep 2023 22:37:00 +1000 Subject: [PATCH] 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 Reviewed-on: https://review.coreboot.org/c/flashrom/+/77747 Reviewed-by: Alexander Goncharov Tested-by: build bot (Jenkins) Reviewed-by: Peter Marheine --- erasure_layout.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/erasure_layout.c b/erasure_layout.c index c9ac44bc5..b43e52e8f 100644 --- a/erasure_layout.c +++ b/erasure_layout.c @@ -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