From: Mark Hounschell Date: Wed, 21 May 2014 19:48:47 +0000 (-0400) Subject: staging: dgap: Remove unnecessary test on count X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=490de248d6479654f0120d1b9675424bfed34a3c;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git staging: dgap: Remove unnecessary test on count This patch removes an unnecessary test. We've already tested it by the time we get here with no possiblity of it being changed. Signed-off-by: Mark Hounschell Tested-by: Mark Hounschell Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c index b34d903d596a..28c238141264 100644 --- a/drivers/staging/dgap/dgap.c +++ b/drivers/staging/dgap/dgap.c @@ -2731,16 +2731,6 @@ static int dgap_tty_write(struct tty_struct *tty, const unsigned char *buf, ch->ch_flags &= ~CH_PRON; } - /* - * If there is nothing left to copy, or - * I can't handle any more data, leave. - */ - if (count <= 0) { - dgap_set_firmware_event(un, UN_LOW | UN_EMPTY); - spin_unlock_irqrestore(&ch->ch_lock, lock_flags); - return 0; - } - n = count; /*