Fixed segfault if creation of TTY devices fails.
authorFlorian Pose <fp@igh-essen.com>
Mon, 25 Jan 2010 18:31:27 +0100
changeset 1788 af61953c3ba4
parent 1787 439f186185be
child 1789 058248c47ba0
Fixed segfault if creation of TTY devices fails.
examples/tty/serial.c
--- a/examples/tty/serial.c	Mon Jan 25 17:42:07 2010 +0100
+++ b/examples/tty/serial.c	Mon Jan 25 18:31:27 2010 +0100
@@ -699,7 +699,7 @@
     return 0;
 
 out_ports:
-    for (i--; i <= 0; i--) {
+    for (i--; i >= 0; i--) {
         el60xx_port_clear(el6002->port + i);
     }
 out_return: