aboutsummaryrefslogtreecommitdiffstats
path: root/cli_output.c
diff options
context:
space:
mode:
authorAnastasia Klimchuk <aklm@chromium.org>2021-05-24 15:12:10 +1000
committerNico Huber <nico.h@gmx.de>2021-06-20 09:11:31 +0000
commit751afa88a7f22487069665c5d206ae490f158231 (patch)
tree48f493b249822ed89147d8d24a155c0da3ad8cf2 /cli_output.c
parent72fd4f194e8988bc0dcf99d2929408b23b39bf75 (diff)
downloadflashrom-751afa88a7f22487069665c5d206ae490f158231.tar.gz
flashrom-751afa88a7f22487069665c5d206ae490f158231.tar.bz2
flashrom-751afa88a7f22487069665c5d206ae490f158231.zip
buspirate_spi.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: I04d57e2552d23a1a4a906c68539f0ccefc13e8a0 Signed-off-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-on: https://review.coreboot.org/c/flashrom/+/52877 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'cli_output.c')
0 files changed, 0 insertions, 0 deletions