From 69a6b9b1b6aec645d2efa23db2c15ed287e672dd Mon Sep 17 00:00:00 2001 From: Alberto Garcia Date: Mon, 10 Dec 2012 11:49:58 +0100 Subject: ipack/devices/ipoctal: don't check if nb_bytes is < 0 It is an unsigned int so that check is pointless. Signed-off-by: Alberto Garcia Signed-off-by: Samuel Iglesias Gonsalvez Signed-off-by: Greg Kroah-Hartman --- drivers/ipack/devices/ipoctal.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/ipack') diff --git a/drivers/ipack/devices/ipoctal.c b/drivers/ipack/devices/ipoctal.c index e66135da63ce..a33a849765c6 100644 --- a/drivers/ipack/devices/ipoctal.c +++ b/drivers/ipack/devices/ipoctal.c @@ -183,10 +183,8 @@ static void ipoctal_irq_tx(struct ipoctal_channel *channel) unsigned char value; unsigned int *pointer_write = &channel->pointer_write; - if (channel->nb_bytes <= 0) { - channel->nb_bytes = 0; + if (channel->nb_bytes == 0) return; - } value = channel->tty_port.xmit_buf[*pointer_write]; iowrite8(value, &channel->regs->w.thr); -- cgit v1.2.3-59-g8ed1b