aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2007-05-08 03:31:38 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-08 14:15:14 -0400
commit83ae1b79c898838e16ac8cde69b39d22d36fb035 (patch)
treee7571f14e4167f4425b8b05ed2cf3b59c8b383b5 /fs
parenta3e0975684337738997771416535d0e5d6fa27cd (diff)
Fix error handling in HDIO_GETGEO compat wrapper
Don't clobber error from sys_ioctl in HDIO_GETGEO compat wrapper. Signed-off-by: Andreas Schwab <schwab@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/compat_ioctl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c
index 6972d242fbdf..d92bc3eb7afc 100644
--- a/fs/compat_ioctl.c
+++ b/fs/compat_ioctl.c
@@ -684,8 +684,10 @@ static int hdio_getgeo(unsigned int fd, unsigned int cmd, unsigned long arg)
684 if (!err) { 684 if (!err) {
685 err = copy_to_user (ugeo, &geo, 4); 685 err = copy_to_user (ugeo, &geo, 4);
686 err |= __put_user (geo.start, &ugeo->start); 686 err |= __put_user (geo.start, &ugeo->start);
687 if (err)
688 err = -EFAULT;
687 } 689 }
688 return err ? -EFAULT : 0; 690 return err;
689} 691}
690 692
691static int hdio_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg) 693static int hdio_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)