]> git.baikalelectronics.ru Git - uboot.git/commit
efi_loader: CloseProtocol in efi_fmp_find
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Fri, 7 Oct 2022 13:29:52 +0000 (15:29 +0200)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Mon, 10 Oct 2022 14:34:25 +0000 (16:34 +0200)
commit4a8cef948f506e71605d9b8e4894105e8490225e
treefc7149d22c0f091a5c6a0f231fa749a9abf44843
parent79ad9154c3b9bab120ac2b52c589c9806b3be968
efi_loader: CloseProtocol in efi_fmp_find

The CloseProtocol() boot service requires a handle as first argument.
Passing the protocol interface is incorrect.

CloseProtocol() only has an effect if called with a non-zero value for
agent_handle. HandleProtocol() uses an opaque agent_handle when invoking
OpenProtocol() (currently NULL). Therefore HandleProtocol() should be
avoided.

* Replace the LocateHandle() call by efi_search_protocol().
* Remove the CloseProtocol() call.

Fixes: 5696828e7af3 ("efi_loader: capsule: support firmware update")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
lib/efi_loader/efi_capsule.c