aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2014-12-10 15:52:22 -0800
committerBen Hutchings <ben@decadent.org.uk>2015-02-20 00:49:30 +0000
commit3101f45c82bc6154f74dd10cbd500fee28e4f5a6 (patch)
treefe768c235c4317e9904f568b0a5269aac191cf5f /fs
parentef8977c12383dcd642c33c047ac65d95270fcb1f (diff)
downloadkernel_samsung_smdk4412-3101f45c82bc6154f74dd10cbd500fee28e4f5a6.zip
kernel_samsung_smdk4412-3101f45c82bc6154f74dd10cbd500fee28e4f5a6.tar.gz
kernel_samsung_smdk4412-3101f45c82bc6154f74dd10cbd500fee28e4f5a6.tar.bz2
ncpfs: return proper error from NCP_IOC_SETROOT ioctl
commit a682e9c28cac152e6e54c39efcf046e0c8cfcf63 upstream. 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> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'fs')
-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 790e92a..ea6f706 100644
--- a/fs/ncpfs/ioctl.c
+++ b/fs/ncpfs/ioctl.c
@@ -445,7 +445,6 @@ static long __ncp_ioctl(struct inode *inode, unsigned int cmd, unsigned long arg
result = -EIO;
}
}
- result = 0;
}
mutex_unlock(&server->root_setup_lock);