intpm(4): Do not attach if io_res can not be allocated
Attempts to use the driver without an io_res result in immediate panic. Sponsored by: Dell EMC Isilon
This commit is contained in:
parent
cf7df9f141
commit
54d89ef114
@ -191,6 +191,10 @@ sb8xx_attach(device_t dev)
|
||||
}
|
||||
sc->io_res = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &sc->io_rid,
|
||||
RF_ACTIVE);
|
||||
if (sc->io_res == NULL) {
|
||||
device_printf(dev, "Could not allocate I/O space\n");
|
||||
return (ENXIO);
|
||||
}
|
||||
sc->poll = 1;
|
||||
return (0);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user