mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
TTY: simplify tty_driver_lookup_tty a bit
Remove the useless local variable and return the value itself. Signed-off-by: Jiri Slaby <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
2f16669d32
commit
d4834267e8
1 changed files with 1 additions and 4 deletions
|
|
@ -1230,13 +1230,10 @@ static void tty_line_name(struct tty_driver *driver, int index, char *p)
|
|||
static struct tty_struct *tty_driver_lookup_tty(struct tty_driver *driver,
|
||||
struct inode *inode, int idx)
|
||||
{
|
||||
struct tty_struct *tty;
|
||||
|
||||
if (driver->ops->lookup)
|
||||
return driver->ops->lookup(driver, inode, idx);
|
||||
|
||||
tty = driver->ttys[idx];
|
||||
return tty;
|
||||
return driver->ttys[idx];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue