forked from luck/tmp_suning_uos_patched
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>
This commit is contained in:
parent
a3e0975684
commit
83ae1b79c8
|
@ -684,8 +684,10 @@ static int hdio_getgeo(unsigned int fd, unsigned int cmd, unsigned long arg)
|
|||
if (!err) {
|
||||
err = copy_to_user (ugeo, &geo, 4);
|
||||
err |= __put_user (geo.start, &ugeo->start);
|
||||
if (err)
|
||||
err = -EFAULT;
|
||||
}
|
||||
return err ? -EFAULT : 0;
|
||||
return err;
|
||||
}
|
||||
|
||||
static int hdio_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
|
||||
|
|
Loading…
Reference in New Issue
Block a user