staging: speakup: remove unused code
authorOkash Khawaja <okash.khawaja@gmail.com>
Thu, 1 Jun 2017 13:15:29 +0000 (14:15 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 3 Jun 2017 08:38:25 +0000 (17:38 +0900)
In spk_ttyio_release we read tty's index but never do anything with it.
The patch removes this dead code.

Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/speakup/spk_ttyio.c

index 7b1eaf976f52ba51caaebb4d66336b61cd9d6070..d55c056bbefece2870f90effe7adac0e58aec526 100644 (file)
@@ -247,13 +247,10 @@ EXPORT_SYMBOL_GPL(spk_ttyio_synth_probe);
 
 void spk_ttyio_release(void)
 {
-       int idx;
-
        if (!speakup_tty)
                return;
 
        tty_lock(speakup_tty);
-       idx = speakup_tty->index;
 
        if (speakup_tty->ops->close)
                speakup_tty->ops->close(speakup_tty, NULL);