diff options
Diffstat (limited to 'drivers/char/lp.c')
-rw-r--r-- | drivers/char/lp.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/char/lp.c b/drivers/char/lp.c index 0fbf1a776b52..a741e418b456 100644 --- a/drivers/char/lp.c +++ b/drivers/char/lp.c | |||
@@ -705,16 +705,13 @@ static long lp_compat_ioctl(struct file *file, unsigned int cmd, | |||
705 | { | 705 | { |
706 | unsigned int minor; | 706 | unsigned int minor; |
707 | struct timeval par_timeout; | 707 | struct timeval par_timeout; |
708 | struct compat_timeval __user *tc; | ||
709 | int ret; | 708 | int ret; |
710 | 709 | ||
711 | minor = iminor(file->f_path.dentry->d_inode); | 710 | minor = iminor(file->f_path.dentry->d_inode); |
712 | mutex_lock(&lp_mutex); | 711 | mutex_lock(&lp_mutex); |
713 | switch (cmd) { | 712 | switch (cmd) { |
714 | case LPSETTIMEOUT: | 713 | case LPSETTIMEOUT: |
715 | tc = compat_ptr(arg); | 714 | if (compat_get_timeval(&par_timeout, compat_ptr(arg))) { |
716 | if (get_user(par_timeout.tv_sec, &tc->tv_sec) || | ||
717 | get_user(par_timeout.tv_usec, &tc->tv_usec)) { | ||
718 | ret = -EFAULT; | 715 | ret = -EFAULT; |
719 | break; | 716 | break; |
720 | } | 717 | } |