From: Okash Khawaja Date: Thu, 1 Jun 2017 13:15:29 +0000 (+0100) Subject: staging: speakup: remove unused code X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=349190d56be6eccb940df18831d8654b19a697aa;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git staging: speakup: remove unused code 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 Reviewed-by: Samuel Thibault Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/speakup/spk_ttyio.c b/drivers/staging/speakup/spk_ttyio.c index 7b1eaf976f52..d55c056bbefe 100644 --- a/drivers/staging/speakup/spk_ttyio.c +++ b/drivers/staging/speakup/spk_ttyio.c @@ -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);