瀏覽代碼

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

tags/v0.9.3
Michael Brown 20 年之前
父節點
當前提交
feb652709d
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4
    1
      src/drivers/bus/isa.c

+ 4
- 1
src/drivers/bus/isa.c 查看文件

100
 	/* If ioaddr is zero, it means we're using a driver-specified
100
 	/* If ioaddr is zero, it means we're using a driver-specified
101
 	 * ioaddr
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
 		isa->ioaddr = driver->probe_addrs[isa->driver_probe_idx];
106
 		isa->ioaddr = driver->probe_addrs[isa->driver_probe_idx];
107
+	}
105
 
108
 
106
 	/* Use probe_addr method to see if there's a device
109
 	/* Use probe_addr method to see if there's a device
107
 	 * present at this address.
110
 	 * present at this address.

Loading…
取消
儲存