Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752785AbbDEXR2 (ORCPT ); Sun, 5 Apr 2015 19:17:28 -0400 Received: from mail-wg0-f52.google.com ([74.125.82.52]:34027 "EHLO mail-wg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752576AbbDEXRY (ORCPT ); Sun, 5 Apr 2015 19:17:24 -0400 From: Giedrius Statkevicius To: lidza.louina@gmail.com, markh@compro.net Cc: gregkh@linuxfoundation.org, driverdev-devel@linuxdriverproject.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Giedrius=20Statkevi=C4=8Dius?= Subject: [PATCH 2/2] staging: dgnc: remove redundant check Date: Mon, 6 Apr 2015 02:16:53 +0300 Message-Id: <1428275813-26390-2-git-send-email-giedrius.statkevicius@gmail.com> X-Mailer: git-send-email 2.3.5 In-Reply-To: <1428275813-26390-1-git-send-email-giedrius.statkevicius@gmail.com> References: <1428275813-26390-1-git-send-email-giedrius.statkevicius@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 969 Lines: 35 count doesn't get changed in between identical checks in dgnc_tty_write() so remove the second check Signed-off-by: Giedrius Statkevičius --- v2: no change drivers/staging/dgnc/dgnc_tty.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c index cf2eb21..61d5a8e 100644 --- a/drivers/staging/dgnc/dgnc_tty.c +++ b/drivers/staging/dgnc/dgnc_tty.c @@ -1773,12 +1773,6 @@ static int dgnc_tty_write(struct tty_struct *tty, ch->ch_flags &= ~CH_PRON; } - /* - * If there is nothing left to copy, or I can't handle any more data, leave. - */ - if (count <= 0) - goto exit_retry; - n = count; /* -- 2.3.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/