Loading drivers/char/tty_io.c +22 −26 Original line number Diff line number Diff line Loading @@ -3515,15 +3515,15 @@ static int tty_tiocmget(struct tty_struct *tty, struct file *file, int __user *p static int tty_tiocmset(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned __user *p) { int retval = -EINVAL; if (tty->ops->tiocmset) { int retval; unsigned int set, clear, val; if (tty->ops->tiocmset == NULL) return -EINVAL; retval = get_user(val, p); if (retval) return retval; set = clear = 0; switch (cmd) { case TIOCMBIS: Loading @@ -3537,13 +3537,9 @@ static int tty_tiocmset(struct tty_struct *tty, struct file *file, unsigned int clear = ~val; break; } set &= TIOCM_DTR|TIOCM_RTS|TIOCM_OUT1|TIOCM_OUT2|TIOCM_LOOP; clear &= TIOCM_DTR|TIOCM_RTS|TIOCM_OUT1|TIOCM_OUT2|TIOCM_LOOP; retval = tty->ops->tiocmset(tty, file, set, clear); } return retval; return tty->ops->tiocmset(tty, file, set, clear); } /* Loading Loading
drivers/char/tty_io.c +22 −26 Original line number Diff line number Diff line Loading @@ -3515,15 +3515,15 @@ static int tty_tiocmget(struct tty_struct *tty, struct file *file, int __user *p static int tty_tiocmset(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned __user *p) { int retval = -EINVAL; if (tty->ops->tiocmset) { int retval; unsigned int set, clear, val; if (tty->ops->tiocmset == NULL) return -EINVAL; retval = get_user(val, p); if (retval) return retval; set = clear = 0; switch (cmd) { case TIOCMBIS: Loading @@ -3537,13 +3537,9 @@ static int tty_tiocmset(struct tty_struct *tty, struct file *file, unsigned int clear = ~val; break; } set &= TIOCM_DTR|TIOCM_RTS|TIOCM_OUT1|TIOCM_OUT2|TIOCM_LOOP; clear &= TIOCM_DTR|TIOCM_RTS|TIOCM_OUT1|TIOCM_OUT2|TIOCM_LOOP; retval = tty->ops->tiocmset(tty, file, set, clear); } return retval; return tty->ops->tiocmset(tty, file, set, clear); } /* Loading