summaryrefslogtreecommitdiffstats
path: root/fs/ncpfs
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2014-12-10 15:52:22 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2014-12-10 17:41:13 -0800
commita682e9c28cac152e6e54c39efcf046e0c8cfcf63 (patch)
treeaa6318f6b1ae5ae43471d6dbb47b5982d7ecd758 /fs/ncpfs
parent6ef4536e2f19c4dba3637413d73ea00b19764bc0 (diff)
downloadlinux-a682e9c28cac152e6e54c39efcf046e0c8cfcf63.tar.gz
linux-a682e9c28cac152e6e54c39efcf046e0c8cfcf63.tar.bz2
linux-a682e9c28cac152e6e54c39efcf046e0c8cfcf63.zip
ncpfs: return proper error from NCP_IOC_SETROOT ioctl
If some error happens in NCP_IOC_SETROOT ioctl, the appropriate error return value is then (in most cases) just overwritten before we return. This can result in reporting success to userspace although error happened. This bug was introduced by commit 2e54eb96e2c8 ("BKL: Remove BKL from ncpfs"). Propagate the errors correctly. Coverity id: 1226925. Fixes: 2e54eb96e2c80 ("BKL: Remove BKL from ncpfs") Signed-off-by: Jan Kara <jack@suse.cz> Cc: Petr Vandrovec <petr@vandrovec.name> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ncpfs')
-rw-r--r--fs/ncpfs/ioctl.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/ncpfs/ioctl.c b/fs/ncpfs/ioctl.c
index d5659d96ee7f..cf7e043a9447 100644
--- a/fs/ncpfs/ioctl.c
+++ b/fs/ncpfs/ioctl.c
@@ -447,7 +447,6 @@ static long __ncp_ioctl(struct inode *inode, unsigned int cmd, unsigned long arg
result = -EIO;
}
}
- result = 0;
}
mutex_unlock(&server->root_setup_lock);