aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHerton Ronaldo Krzesinski <herton.krzesinski@canonical.com>2011-03-31 14:35:31 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-04-19 17:39:28 -0400
commit909bc7741bef0bda57489884cf2e914c3072aca9 (patch)
tree15a6b8efb0d0f3103a55e720eea8537eae33d45d /drivers
parentf0e615c3cb72b42191b558c130409335812621d8 (diff)
vt: remove uneeded retval check before tty->ops->open inside tty_open
The current check is uneeded, since !retval will always returns true, as retval returned from tty_add_file is checked earlier and tty_open exits if it's not zero. Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/tty/tty_io.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index d7d50b48287e..188632e4734d 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -1902,12 +1902,10 @@ got_driver:
1902#ifdef TTY_DEBUG_HANGUP 1902#ifdef TTY_DEBUG_HANGUP
1903 printk(KERN_DEBUG "opening %s...", tty->name); 1903 printk(KERN_DEBUG "opening %s...", tty->name);
1904#endif 1904#endif
1905 if (!retval) { 1905 if (tty->ops->open)
1906 if (tty->ops->open) 1906 retval = tty->ops->open(tty, filp);
1907 retval = tty->ops->open(tty, filp); 1907 else
1908 else 1908 retval = -ENODEV;
1909 retval = -ENODEV;
1910 }
1911 filp->f_flags = saved_flags; 1909 filp->f_flags = saved_flags;
1912 1910
1913 if (!retval && test_bit(TTY_EXCLUSIVE, &tty->flags) && 1911 if (!retval && test_bit(TTY_EXCLUSIVE, &tty->flags) &&