diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2018-09-26 10:23:19 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-09-26 10:23:31 +0200 |
commit | 197489ba31b70c51f76151d2c58a1d8f5d73dfe6 (patch) | |
tree | 73d4ea0d7837cd3aee24fb1a58c1d41cdf38fb13 | |
parent | a4514478e6a20edf70537af15fbffbfb1bc5982b (diff) | |
download | barebox-197489ba31b70c51f76151d2c58a1d8f5d73dfe6.tar.gz barebox-197489ba31b70c51f76151d2c58a1d8f5d73dfe6.tar.xz |
fs: open: Do not forget to set errno
When the initial lookup fails in open we have to go to the error path
which sets errno correctly rather than returning directly.
Fixes: b3fbfad7ae ("fs: dentry cache implementation")
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | fs/fs.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2237,7 +2237,7 @@ int open(const char *pathname, int flags, ...) putname(nd.name); if (error) - return error; + goto out1; if (d_is_negative(dentry)) { if (flags & O_CREAT) { |