summaryrefslogtreecommitdiffstats
path: root/src/drivers
diff options
context:
space:
mode:
authorMichael Brown2005-04-22 14:02:34 +0200
committerMichael Brown2005-04-22 14:02:34 +0200
commitfeb652709d7c1a3166ef53e2f80b6955bfaa2073 (patch)
treeb9e215bd6b33d8b2778646b12db274c18ffd60bc /src/drivers
parentUpdated to current API. (diff)
downloadipxe-feb652709d7c1a3166ef53e2f80b6955bfaa2073.tar.gz
ipxe-feb652709d7c1a3166ef53e2f80b6955bfaa2073.tar.xz
ipxe-feb652709d7c1a3166ef53e2f80b6955bfaa2073.zip
Must not go beyond end of driver's probe list.
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/bus/isa.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/drivers/bus/isa.c b/src/drivers/bus/isa.c
index 9c5b4efd..95701c36 100644
--- a/src/drivers/bus/isa.c
+++ b/src/drivers/bus/isa.c
@@ -100,8 +100,11 @@ int isa_check_driver ( struct bus_dev *bus_dev,
/* If ioaddr is zero, it means we're using a driver-specified
* ioaddr
*/
- if ( ! isa->ioaddr )
+ if ( ! isa->ioaddr ) {
+ if ( isa->driver_probe_idx >= driver->addr_count )
+ return 0;
isa->ioaddr = driver->probe_addrs[isa->driver_probe_idx];
+ }
/* Use probe_addr method to see if there's a device
* present at this address.