This driver is taking uinitialised stack gunk from the pdev[] array and
feeding it into pci_read_config_byte() and crashing when modprobed with no
hardware present.
Fix it to not index past the initialised members of pdev[].
We don't know if this driver works.
break;
}
}
- for (h = 0; h < MAX_ATP; h++) {
+ for (h = 0; h < card; h++) {
struct atp_unit tmp, *dev;
- if (pdev[h] == NULL) {
- return count;
- }
/* Found an atp870u/w. */
base_io = pci_resource_start(pdev[h], 0);