staging: xillybus: Clarified the stop condition for a loop
authorEli Billauer <eli.billauer@gmail.com>
Thu, 4 Sep 2014 14:47:50 +0000 (17:47 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Sep 2014 20:58:19 +0000 (13:58 -0700)
Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/xillybus/xillybus_core.c

index 63c2c14f876e5a3a46bad965a402cec1dc5c24e1..1b63197843b717c7a50d2d3c674b2b3be450203c 100644 (file)
@@ -172,9 +172,9 @@ irqreturn_t xillybus_isr(int irq, void *data)
                return IRQ_HANDLED;
        }
 
-       buf_size = i;
+       buf_size = i + 2;
 
-       for (i = 0; i <= buf_size; i += 2) { /* Scan through messages */
+       for (i = 0; i < buf_size; i += 2) { /* Scan through messages */
                opcode = (buf[i] >> 24) & 0xff;
 
                msg_dir = buf[i] & 1;