Edward O'Callaghan submitted this change.

View Change



2 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.

Approvals: build bot (Jenkins): Verified Felix Singer: Looks good to me, approved Anastasia Klimchuk: Looks good to me, approved
flashrom.c: Drop redundant chip read validation in verify_range()

The 'chip_safety_check()' already validates the chip structure
within 'prepare_flash_access()' before all subsequent chip operations
such as 'verify_range()' and therefore the chip structure is
guaranteed to be valid in the domain of those operations.

BUG=none
BRANCH=none
TEST=builds

Change-Id: Ifc57dd89715115e03d013691352463a8b3c0dc52
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/69471
Reviewed-by: Felix Singer <felixsinger@posteo.net>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
---
M flashrom.c
1 file changed, 23 insertions(+), 5 deletions(-)

diff --git a/flashrom.c b/flashrom.c
index 5483af3..51a6b64 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -511,11 +511,6 @@
return -1;
}

- if (!lookup_read_func_ptr(flash->chip)) {
- msg_cerr("ERROR: flashrom has no read function for this flash chip.\n");
- return -1;
- }
-
uint8_t *readbuf = malloc(len);
if (!readbuf) {
msg_gerr("Could not allocate memory!\n");

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

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ifc57dd89715115e03d013691352463a8b3c0dc52
Gerrit-Change-Number: 69471
Gerrit-PatchSet: 4
Gerrit-Owner: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Reviewer: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Reviewer: Felix Singer <felixsinger@posteo.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-MessageType: merged