From: Jiri Slaby Date: Mon, 5 Mar 2012 13:51:53 +0000 (+0100) Subject: TTY: simplify tty_driver_lookup_tty a bit X-Git-Tag: MMI-PSA29.97-13-9~17267^2~86 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d4834267e81c8f08685e6ee55751551fa60f66e3;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git TTY: simplify tty_driver_lookup_tty a bit Remove the useless local variable and return the value itself. Signed-off-by: Jiri Slaby Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index bd95cea3173b..d0d3d1f94926 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]; } /**