projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2f16669
)
TTY: simplify tty_driver_lookup_tty a bit
author
Jiri Slaby
<jslaby@suse.cz>
Mon, 5 Mar 2012 13:51:53 +0000
(14:51 +0100)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Thu, 8 Mar 2012 19:38:50 +0000
(11:38 -0800)
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>
drivers/tty/tty_io.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/tty/tty_io.c
b/drivers/tty/tty_io.c
index bd95cea3173b03be38c17e2f4d47730f4791ee21..d0d3d1f94926596524fc5b640b6b1bd8d2efb54b 100644
(file)
--- 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];
}
/**