From c8894348454aef103a29e5afbfe45c0959b9d45b Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 10 May 2023 16:34:26 -0600 Subject: bootstd: Tidy up reporting of errors In a few cases the error handling is not quite right. Make sure we return the actual error in distro_efi_read_bootflow_file() rather than -EINVAL. Return -IO when a file cannot be read. Also show the error name if available. This does not change operation, but does make it easier to diagnose problems. Signed-off-by: Simon Glass --- boot/bootmeth_efi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'boot/bootmeth_efi.c') diff --git a/boot/bootmeth_efi.c b/boot/bootmeth_efi.c index 6f70f2229b9..af31fbfc85d 100644 --- a/boot/bootmeth_efi.c +++ b/boot/bootmeth_efi.c @@ -235,7 +235,7 @@ static int distro_efi_read_bootflow_file(struct udevice *dev, ret = efiload_read_file(desc, bflow); if (ret) - return log_msg_ret("read", -EINVAL); + return log_msg_ret("read", ret); fdt_addr = env_get_hex("fdt_addr_r", 0); -- cgit v1.2.3