]> git.baikalelectronics.ru Git - uboot.git/commit
efi: Fix ESRT refresh after Capsule update
authorJose Marinho <jose.marinho@arm.com>
Mon, 19 Apr 2021 13:54:33 +0000 (14:54 +0100)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Sat, 24 Apr 2021 04:53:40 +0000 (06:53 +0200)
commit1510b39b261c1ad51170c0860fda14d4b8924f20
tree1e3e0253584ed511771e533577ccb02006f132da
parenta462cf464f428338b15218aa7f857585ce640b4d
efi: Fix ESRT refresh after Capsule update

Indicated by Coverity Scan CID 331147

The ESRT was being refreshed in situations where the UpdateCapsule
procedure failed. In that scenario:

1) the ESRT refresh was superfluous.
2) a failed ESRT refresh return code overwrites the UpdateCapsule error
return code.

This commit ensures that the ESRT is only refreshed when the
UpdateCapsule performs successfully.

CC: Heinrich Schuchardt <xypron.glpk@gmx.de>
CC: Sughosh Ganu <sughosh.ganu@linaro.org>
CC: AKASHI Takahiro <takahiro.akashi@linaro.org>
CC: Tom Rini <trini@konsulko.com>
CC: Andre Przywara <andre.przywara@arm.com>
CC: nd@arm.com
Signed-off-by: Jose Marinho <jose.marinho@arm.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
lib/efi_loader/efi_capsule.c