[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1360711049-5557-1-git-send-email-wpawel@gmail.com>
Date: Wed, 13 Feb 2013 00:17:29 +0100
From: Pawel Wieczorkiewicz <wpawel@...il.com>
To: nicolas.ferre@...el.com, gregkh@...uxfoundation.org,
grant.likely@...retlab.ca, jslaby@...e.cz
Cc: linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org,
Pawel Wieczorkiewicz <wpawel@...il.com>
Subject: [PATCH 1/1] tty: atmel_serial_probe(): index of atmel_ports[] fix
From: Pawel Wieczorkiewicz <wpawel@...il.com>
Index of atmel_ports[ATMEL_MAX_UART] should be smaller
than ATMEL_MAX_UART.
Signed-off-by: Pawel Wieczorkiewicz <wpawel@...il.com>
---
drivers/tty/serial/atmel_serial.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index d4a7c24..3f7586a 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -1772,7 +1772,7 @@ static int atmel_serial_probe(struct platform_device *pdev)
ret = find_first_zero_bit(&atmel_ports_in_use,
sizeof(atmel_ports_in_use));
- if (ret > ATMEL_MAX_UART) {
+ if (!(ret < ATMEL_MAX_UART)) {
ret = -ENODEV;
goto err;
}
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists