mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 07:34:31 +00:00
efi_loader: Delete() return EFI_WARN_DELETE_FAILURE
If EFI_FILE_PROTOCOL.Delete() fails, always close the handle and return EFI_WARN_DELETE_FAILURE. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
parent
c974ab0ecb
commit
fa390810e1
1 changed files with 2 additions and 8 deletions
|
@ -307,16 +307,10 @@ static efi_status_t EFIAPI efi_file_delete(struct efi_file_handle *file)
|
||||||
|
|
||||||
EFI_ENTRY("%p", file);
|
EFI_ENTRY("%p", file);
|
||||||
|
|
||||||
if (set_blk_dev(fh)) {
|
if (set_blk_dev(fh) || fs_unlink(fh->path))
|
||||||
ret = EFI_DEVICE_ERROR;
|
ret = EFI_WARN_DELETE_FAILURE;
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fs_unlink(fh->path))
|
|
||||||
ret = EFI_DEVICE_ERROR;
|
|
||||||
file_close(fh);
|
file_close(fh);
|
||||||
|
|
||||||
error:
|
|
||||||
return EFI_EXIT(ret);
|
return EFI_EXIT(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue