summaryrefslogtreecommitdiffstats
path: root/sys/dev/pccard
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2001-04-21 02:29:09 +0000
committerimp <imp@FreeBSD.org>2001-04-21 02:29:09 +0000
commitbfdb72c0bc4c39ff1cdce0379bc5bff811a2520e (patch)
tree4ae5ec4a554679c84883d12495bd094d0e6ad895 /sys/dev/pccard
parent25f5a9093e23e49b8ab91d696bd7b1b1b3803f86 (diff)
downloadFreeBSD-src-bfdb72c0bc4c39ff1cdce0379bc5bff811a2520e.zip
FreeBSD-src-bfdb72c0bc4c39ff1cdce0379bc5bff811a2520e.tar.gz
Only try to delete the resource if we actually got it.
Diffstat (limited to 'sys/dev/pccard')
-rw-r--r--sys/dev/pccard/pccard.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/pccard/pccard.c b/sys/dev/pccard/pccard.c
index 72c18a8..532c33c 100644
--- a/sys/dev/pccard/pccard.c
+++ b/sys/dev/pccard/pccard.c
@@ -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) {
OpenPOWER on IntegriCloud