Only try to delete the resource if we actually got it.
This commit is contained in:
parent
9d4f526475
commit
19f1fe42e6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=75756
@ -370,10 +370,11 @@ pccard_function_init(struct pccard_function *pf)
|
||||
* from this config entry.
|
||||
*/
|
||||
for (i = 0; i < cfe->num_iospace; i++) {
|
||||
resource_list_delete(rl, SYS_RES_IOPORT, i);
|
||||
if (cfe->iores[i])
|
||||
if (cfe->iores[i]) {
|
||||
resource_list_delete(rl, SYS_RES_IOPORT, i);
|
||||
bus_release_resource(bus, SYS_RES_IOPORT,
|
||||
cfe->iorid[i], cfe->iores[i]);
|
||||
}
|
||||
cfe->iores[i] = NULL;
|
||||
}
|
||||
if (cfe->irqmask && cfe->irqres) {
|
||||
|
Loading…
Reference in New Issue
Block a user