From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753177AbcDFKoR (ORCPT ); Wed, 6 Apr 2016 06:44:17 -0400 Received: from mail-pf0-f182.google.com ([209.85.192.182]:33103 "EHLO mail-pf0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750994AbcDFKoP (ORCPT ); Wed, 6 Apr 2016 06:44:15 -0400 From: Sudip Mukherjee To: Greg Kroah-Hartman , Jiri Slaby Cc: linux-kernel@vger.kernel.org, Sudip Mukherjee Subject: [PATCH] tty: synclink: remove unneeded test Date: Wed, 6 Apr 2016 11:44:04 +0100 Message-Id: <1459939444-21279-1-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 2.1.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We reach this point of code after a test of 'info->port.tty->hw_stopped', we do not need to test for 'info->port.tty' as it is obvious that info->port.tty is not NULL now, we have already dereferenced it. Signed-off-by: Sudip Mukherjee --- drivers/tty/synclink.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/tty/synclink.c b/drivers/tty/synclink.c index f5476e2..de372f5 100644 --- a/drivers/tty/synclink.c +++ b/drivers/tty/synclink.c @@ -1361,8 +1361,7 @@ static void mgsl_isr_io_pin( struct mgsl_struct *info ) if (status & MISCSTATUS_CTS) { if ( debug_level >= DEBUG_LEVEL_ISR ) printk("CTS tx start..."); - if (info->port.tty) - info->port.tty->hw_stopped = 0; + info->port.tty->hw_stopped = 0; usc_start_transmitter(info); info->pending_bh |= BH_TRANSMIT; return; -- 2.1.4