summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2018-08-30 12:15:29 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2018-08-30 12:34:39 +0200
commitc45c74edc20386af8fe12fecb97b5953ba9716b0 (patch)
treec30ed2e7ae9ee923ef3a29aa76532cb9982963c0
parent0909ed8f4b4c4aeadb8b39ecbe9462f58a8b9edd (diff)
downloadbarebox-c45c74edc20386af8fe12fecb97b5953ba9716b0.tar.gz
barebox-c45c74edc20386af8fe12fecb97b5953ba9716b0.tar.xz
fs: tftp: fix return value
When tftp_get_inode() fails it is a sign for a out of memory situtation rather than an indicator for no space left on the filesystem, so return -ENOMEM. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--fs/tftp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/tftp.c b/fs/tftp.c
index bcb95bc1db..0baf0c2890 100644
--- a/fs/tftp.c
+++ b/fs/tftp.c
@@ -653,7 +653,7 @@ static struct dentry *tftp_lookup(struct inode *dir, struct dentry *dentry,
inode = tftp_get_inode(dir->i_sb, dir, S_IFREG | S_IRWXUGO);
if (!inode)
- return ERR_PTR(-ENOSPC);
+ return ERR_PTR(-ENOMEM);
d_add(dentry, inode);