1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-19 02:29:40 +00:00

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:
Conrad Meyer 2017-09-13 16:23:59 +00:00
parent cf7df9f141
commit 54d89ef114
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=323549

View File

@ -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);
}