update for HEAD-2003021201
[reactos.git] / drivers / bus / isapnp / isapnp.c
index ae6569d..4578c75 100644 (file)
@@ -215,21 +215,26 @@ VOID DeactivateLogicalDevice(UCHAR LogicalDevice)
 
 static ULONG FindNextReadPort(VOID)
 {
-       ULONG Port;
-
-  Port = (ULONG)IsaPnPReadPort;
-       while (Port <= ISAPNP_MAX_READ_PORT) {
-               /*
-                * We cannot use NE2000 probe spaces for
-     * ISAPnP or we will lock up machines
-                */
-               if ((Port < 0x280) || (Port > 0x380))
-               {
-                       return Port;
-               }
-               Port += READ_DATA_PORT_STEP;
-       }
-       return 0;
+       ULONG Port;\r
+\r
+       Port = (ULONG)IsaPnPReadPort;\r
+       while (TRUE) {\r
+               Port += READ_DATA_PORT_STEP;\r
+\r
+               if (Port > ISAPNP_MAX_READ_PORT)\r
+               {\r
+                       return 0;\r
+               }\r
+\r
+               /*\r
+                * We cannot use NE2000 probe spaces for\r
+                * ISAPnP or we will lock up machines\r
+                */\r
+               if ((Port < 0x280) || (Port > 0x380))\r
+               {\r
+                       return Port;\r
+               }\r
+       }\r
 }
 
 static BOOLEAN IsolateReadDataPortSelect(VOID)