diff options
author | Jiri Slaby <jslaby@suse.cz> | 2012-03-05 14:51:53 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-03-08 11:38:50 -0800 |
commit | d4834267e81c8f08685e6ee55751551fa60f66e3 (patch) | |
tree | 27f1e4527611045f501f0d1a22dd8a1c958bc80c | |
parent | 2f16669d322e05171c9e1cfd94f402f7399bd2a3 (diff) | |
download | linux-3.10-d4834267e81c8f08685e6ee55751551fa60f66e3.tar.gz linux-3.10-d4834267e81c8f08685e6ee55751551fa60f66e3.tar.bz2 linux-3.10-d4834267e81c8f08685e6ee55751551fa60f66e3.zip |
TTY: simplify tty_driver_lookup_tty a bit
Remove the useless local variable and return the value itself.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/tty/tty_io.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index bd95cea3173..d0d3d1f9492 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -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]; } /** |