summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2019-12-17 08:50:40 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-17 14:42:45 +0100
commitf1d31743a195155c319a00d73299ff1630a532c4 (patch)
tree6e464683ebf7912d6a2e2b1cd7339806fa695ac2 /drivers
parent3578163030782a24e75ba48aba1cfa431dc9100a (diff)
tty: drop useless variable initialisation in tty_kopen()
The driver variable is assigned to unconditionally and not used before. So there is no need to explicitly initialize it at the start of tty_kopen(). Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20191217075040.8020-1-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/tty/tty_io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index d9f54c7d94f2..a1453fe10862 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -1893,7 +1893,7 @@ static struct tty_driver *tty_lookup_driver(dev_t device, struct file *filp,
struct tty_struct *tty_kopen(dev_t device)
{
struct tty_struct *tty;
- struct tty_driver *driver = NULL;
+ struct tty_driver *driver;
int index = -1;
mutex_lock(&tty_mutex);