summaryrefslogtreecommitdiffstats
path: root/drivers/char/vt_ioctl.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-06-04 15:23:07 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-06-04 15:23:07 -0700
commitbf4282cbcf7f53c23e87fb0cef945591cdc8d631 (patch)
treece1844209ec623c1ed661405ffd8f8f37a319aa8 /drivers/char/vt_ioctl.c
parentd7940b04fa441b06b69f05faef43c5fb2156ab72 (diff)
parent66169ad17d9c67a33608830dd83dcef55c85a756 (diff)
downloadblackbird-op-linux-bf4282cbcf7f53c23e87fb0cef945591cdc8d631.tar.gz
blackbird-op-linux-bf4282cbcf7f53c23e87fb0cef945591cdc8d631.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: serial: add support for various Titan PCI cards vt_ioctl: return -EFAULT on copy_from_user errors serial: altera_uart: Proper section for altera_uart_remove tty: fix a little bug in scrup, vt.c altera_uart: Simplify altera_uart_console_putc altera_uart: Don't take spinlock in already protected functions TTY/n_gsm: potential double lock serial: bfin_5xx: fix typo in IER check serial: bfin_5xx: IRDA is not affected by anomaly 05000230 serial_cs: add and sort IDs for serial and modem cards msm_serial: fix serial on trout
Diffstat (limited to 'drivers/char/vt_ioctl.c')
-rw-r--r--drivers/char/vt_ioctl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/char/vt_ioctl.c b/drivers/char/vt_ioctl.c
index 6aa10284104a..cb19dbc52136 100644
--- a/drivers/char/vt_ioctl.c
+++ b/drivers/char/vt_ioctl.c
@@ -1303,7 +1303,9 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
if (!perm)
goto eperm;
ret = copy_from_user(&ui, up, sizeof(struct unimapinit));
- if (!ret)
+ if (ret)
+ ret = -EFAULT;
+ else
con_clear_unimap(vc, &ui);
break;
}
OpenPOWER on IntegriCloud