Edward O'Callaghan has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/69471 )
Change subject: flashrom.c: Drop redundant chip read validation in verify_range() ......................................................................
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 'verfy_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 --- M flashrom.c 1 file changed, 19 insertions(+), 5 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/71/69471/1
diff --git a/flashrom.c b/flashrom.c index 815f489..d842089 100644 --- a/flashrom.c +++ b/flashrom.c @@ -509,11 +509,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");