Browse Source

Must not go beyond end of driver's probe list.

tags/v0.9.3
Michael Brown 19 years ago
parent
commit
feb652709d
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      src/drivers/bus/isa.c

+ 4
- 1
src/drivers/bus/isa.c View File

@@ -100,8 +100,11 @@ int isa_check_driver ( struct bus_dev *bus_dev,
100 100
 	/* If ioaddr is zero, it means we're using a driver-specified
101 101
 	 * ioaddr
102 102
 	 */
103
-	if ( ! isa->ioaddr )
103
+	if ( ! isa->ioaddr ) {
104
+		if ( isa->driver_probe_idx >= driver->addr_count )
105
+			return 0;
104 106
 		isa->ioaddr = driver->probe_addrs[isa->driver_probe_idx];
107
+	}
105 108
 
106 109
 	/* Use probe_addr method to see if there's a device
107 110
 	 * present at this address.

Loading…
Cancel
Save