efi_driver: fix error handling

If creating the block device fails,

* delete all created objects and references
* close the protocol interface on the controller

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
This commit is contained in:
Heinrich Schuchardt 2022-10-03 10:35:35 +02:00
parent 16b27b67c5
commit 43a5891c66
3 changed files with 45 additions and 38 deletions

View file

@ -25,7 +25,7 @@
struct efi_driver_ops {
const efi_guid_t *protocol;
const efi_guid_t *child_protocol;
int (*bind)(efi_handle_t handle, void *interface);
efi_status_t (*bind)(efi_handle_t handle, void *interface);
};
/*