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:28:56 +0200 |
commit | 822dfbd8b4cd5511ca8965f990f39ff2f2b832e8 (patch) | |
tree | e8bb24c0794a2e305eb0ff99b158058883794bf4 | |
parent | 38269ade13965679842625411b547acfc8333e89 (diff) | |
download | barebox-822dfbd8b4cd5511ca8965f990f39ff2f2b832e8.tar.gz barebox-822dfbd8b4cd5511ca8965f990f39ff2f2b832e8.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) { |