aboutsummaryrefslogtreecommitdiffstats
path: root/README
diff options
context:
space:
mode:
authorAnastasia Klimchuk <aklm@chromium.org>2021-05-24 09:55:03 +1000
committerEdward O'Callaghan <quasisec@chromium.org>2021-05-28 01:39:23 +0000
commite2f10684b7c8dd0e0445eba32d40307b5f643e67 (patch)
tree06f80c4a816cb0f88b985d8306db398b27cd62fb /README
parentad8eb60e5d559e113a73e13213846938fded03de (diff)
downloadflashrom-e2f10684b7c8dd0e0445eba32d40307b5f643e67.tar.gz
flashrom-e2f10684b7c8dd0e0445eba32d40307b5f643e67.tar.bz2
flashrom-e2f10684b7c8dd0e0445eba32d40307b5f643e67.zip
serprog.c: Separate shutdown from failed init cleanup
Shutdown function was covering two different jobs here: 1) the actual shutdown which is run at the end of the driver's lifecycle and 2) cleanup in cases when initialisation failed. Now, shutdown is only doing its main job (#1), and the driver itself is doing cleanup when init fails (#2). The good thing is that now resources are released/closed immediately in cases when init fails (vs shutdown function which was run at some point later), and the driver leaves clean space after itself if init fails. And very importantly this unlocks API change which plans to move register_shutdown inside register master API, see https://review.coreboot.org/c/flashrom/+/51761 BUG=b:185191942 TEST=builds Change-Id: Idf4ed62c19667e18cc807913180c48cb8c978805 Signed-off-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-on: https://review.coreboot.org/c/flashrom/+/54861 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Diffstat (limited to 'README')
0 files changed, 0 insertions, 0 deletions