Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 95181
b: refs/heads/master
c: d17468c
h: refs/heads/master
i:
  95179: 911f0a9
v: v3
  • Loading branch information
Alan Cox authored and Linus Torvalds committed Apr 30, 2008
1 parent 2d8d417 commit ecab8ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1c2630ccf922b7ea2c54c184243d4fb2bd2cf3c6
refs/heads/master: d17468c73e138e1108b279acf892dd35937d43ed
9 changes: 1 addition & 8 deletions trunk/drivers/char/tty_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -3459,11 +3459,8 @@ long tty_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
switch (cmd) {
case TIOCSBRK:
case TIOCCBRK:
if (tty->driver->ioctl) {
lock_kernel();
if (tty->driver->ioctl)
retval = tty->driver->ioctl(tty, file, cmd, arg);
unlock_kernel();
}
return retval;

/* These two ioctl's always return success; even if */
Expand Down Expand Up @@ -3584,18 +3581,14 @@ long tty_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
break;
}
if (tty->driver->ioctl) {
lock_kernel();
retval = (tty->driver->ioctl)(tty, file, cmd, arg);
unlock_kernel();
if (retval != -ENOIOCTLCMD)
return retval;
}
ld = tty_ldisc_ref_wait(tty);
retval = -EINVAL;
if (ld->ioctl) {
lock_kernel();
retval = ld->ioctl(tty, file, cmd, arg);
unlock_kernel();
if (retval == -ENOIOCTLCMD)
retval = -EINVAL;
}
Expand Down

0 comments on commit ecab8ad

Please sign in to comment.