summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorSteffen Trumtrar <s.trumtrar@pengutronix.de>2017-07-10 12:33:49 +0200
committerLucas Stach <l.stach@pengutronix.de>2017-07-10 13:02:01 +0200
commitf6b85192fca12084e7e726106a56b9db8592b04d (patch)
tree759ab162d858b519a4dfa11972876331be0912c0 /fs
parent852cc1bf50f8a6cd7bc7ee7bda6da70fd47024ee (diff)
downloadbarebox-f6b85192fca12084e7e726106a56b9db8592b04d.tar.gz
barebox-f6b85192fca12084e7e726106a56b9db8592b04d.tar.xz
fs: efi: return with correct error code in efifs_stat
Instead of erroring out when a file is not present, just return ENOENT if the file does not exist and let the fs-layer handle the situation correctly. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Diffstat (limited to 'fs')
-rw-r--r--fs/efi.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/efi.c b/fs/efi.c
index 0c0f52e87c..85ff914291 100644
--- a/fs/efi.c
+++ b/fs/efi.c
@@ -407,9 +407,7 @@ static int efifs_stat(struct device_d *dev, const char *filename, struct stat *s
efiret = priv->root_dir->open(priv->root_dir, &entry, efi_path, EFI_FILE_MODE_READ, 0ULL);
if (EFI_ERROR(efiret)) {
- pr_err("%s: unable to Open %s: %s\n", __func__, filename,
- efi_strerror(efiret));
- ret = -efi_errno(efiret);
+ ret = -ENOENT;
goto out_free;
}