Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751190AbdFANPr (ORCPT ); Thu, 1 Jun 2017 09:15:47 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:36852 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751058AbdFANPq (ORCPT ); Thu, 1 Jun 2017 09:15:46 -0400 Date: Thu, 1 Jun 2017 14:15:29 +0100 From: Okash Khawaja To: Greg Kroah-Hartman , Jiri Slaby , Samuel Thibault , linux-kernel@vger.kernel.org Cc: William Hubbs , Chris Brannon , Kirk Reiser , speakup@linux-speakup.org, devel@driverdev.osuosl.org Subject: [patch] staging: speakup: remove unused code Message-ID: <20170601131529.GA484@sanghar> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.8.2 (2017-04-18) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 669 Lines: 26 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 --- drivers/staging/speakup/spk_ttyio.c | 3 --- 1 file changed, 3 deletions(-) --- 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);