summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlberto Garcia <agarcia@igalia.com>2012-12-10 11:49:58 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-16 03:24:37 +0100
commit69a6b9b1b6aec645d2efa23db2c15ed287e672dd (patch)
tree180e2afbbb21b2d98c1c9dc640bedd84bbe6737a /drivers
parentipack/devices/ipoctal: Fix race condition during Tx (diff)
downloadlinux-69a6b9b1b6aec645d2efa23db2c15ed287e672dd.tar.xz
linux-69a6b9b1b6aec645d2efa23db2c15ed287e672dd.zip
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 <agarcia@igalia.com> Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ipack/devices/ipoctal.c4
1 files changed, 1 insertions, 3 deletions
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);