public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Giedrius Statkevičius" <giedrius.statkevicius@gmail.com>
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,
	"Giedrius Statkevičius" <giedrius.statkevicius@gmail.com>
Subject: [PATCH v2 2/2 RESEND] staging: dgnc: remove redundant check
Date: Fri, 10 Apr 2015 17:48:55 +0300	[thread overview]
Message-ID: <1428677335-6853-2-git-send-email-giedrius.statkevicius@gmail.com> (raw)
In-Reply-To: <1428677335-6853-1-git-send-email-giedrius.statkevicius@gmail.com>

count doesn't get changed in between identical checks in dgnc_tty_write() so
remove the second check

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
---
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


  reply	other threads:[~2015-04-10 14:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-10 14:48 [PATCH v2 1/2 RESEND] staging: dgnc: remove dead code in dgnc_tty_write() Giedrius Statkevičius
2015-04-10 14:48 ` Giedrius Statkevičius [this message]
2015-04-11  4:51 ` Sudip Mukherjee
2015-04-11 12:20   ` Giedrius Statkevičius
2015-04-11 12:59     ` Sudip Mukherjee
2015-05-03 18:49 ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1428677335-6853-2-git-send-email-giedrius.statkevicius@gmail.com \
    --to=giedrius.statkevicius@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=driverdev-devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=lidza.louina@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markh@compro.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox