Commit 490de248 authored by Mark Hounschell's avatar Mark Hounschell Committed by Greg Kroah-Hartman
Browse files

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: default avatarMark Hounschell <markh@compro.net>
Tested-by: default avatarMark Hounschell <markh@compro.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5512d397
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -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;

	/*