]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ipack/devices/ipoctal: don't check if nb_bytes is < 0
authorAlberto Garcia <agarcia@igalia.com>
Mon, 10 Dec 2012 10:49:58 +0000 (11:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Jan 2013 02:24:37 +0000 (18:24 -0800)
It is an unsigned int so that check is pointless.

Signed-off-by: Alberto Garcia <agarcia@igalia.com>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/ipack/devices/ipoctal.c

index e66135da63ce5975a8afb4188930abf4fdca3d42..a33a849765c6399b283865d120b0135eab638d5f 100644 (file)
@@ -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);