aboutsummaryrefslogtreecommitdiffstats
path: root/include/libflashrom.h
diff options
context:
space:
mode:
authorNikolai Artemiev <nartemiev@google.com>2022-04-27 10:24:10 +1000
committerEdward O'Callaghan <quasisec@chromium.org>2022-05-23 00:24:32 +0000
commitb86ae179adfb4acb4190ef2abe2ee8905c44f26a (patch)
tree4524646360a3e55d148a49564cfcb7ed3225f07d /include/libflashrom.h
parent6f781bdaea5cbd8c315930f3bcf5b69cfd06d504 (diff)
downloadflashrom-b86ae179adfb4acb4190ef2abe2ee8905c44f26a.tar.gz
flashrom-b86ae179adfb4acb4190ef2abe2ee8905c44f26a.tar.bz2
flashrom-b86ae179adfb4acb4190ef2abe2ee8905c44f26a.zip
flashrom: initialize restore func count in correct place
Set `flash->chip_restore_fn_count` to zero before calling the chip's unlock funciton in `prepare_flash_access()`. Previously `flash->chip_restore_fn_count` was uninitialized before calling `chip->unlock()` and subsequently reset after the dispatch by initializing it. This caused the restore handler that is registered within `spi_disable_blockprotect_generic()` to be lost. BUG=b:228945411 BRANCH=none TEST=enable wp; flashrom -w; check wp still enabled. Change-Id: I4c7df424bd2ae2b5fb2a2ab6b47a3c9ff3233acf Signed-off-by: Nikolai Artemiev <nartemiev@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/63881 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'include/libflashrom.h')
0 files changed, 0 insertions, 0 deletions