diff options
| author | Warner Losh <imp@FreeBSD.org> | 2002-09-29 18:07:29 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 2002-09-29 18:07:29 +0000 |
| commit | 214c0b3da48567bd89227eb7e87eaf7fb2118765 (patch) | |
| tree | 47c5a5965b785a00ea2589c5e822d2afa15b324d /sys/dev | |
| parent | 9ffb17c407ac2677bf2610f5ef4d737ab2bd11a1 (diff) | |
Notes
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/cardbus/cardbus_cis.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/cardbus/cardbus_cis.c b/sys/dev/cardbus/cardbus_cis.c index 2d97b4862d6a2..35d918625bdb3 100644 --- a/sys/dev/cardbus/cardbus_cis.c +++ b/sys/dev/cardbus/cardbus_cis.c @@ -739,6 +739,7 @@ cardbus_alloc_resources(device_t cbdev, device_t child) if (barlist[tmp]->res == NULL) { DEVPRINTF((cbdev, "Cannot pre-allocate " "memory for cardbus device\n")); + free(barlist, M_DEVBUF); return (ENOMEM); } barlist[tmp]->start = @@ -795,6 +796,7 @@ cardbus_alloc_resources(device_t cbdev, device_t child) if (barlist[tmp]->res == NULL) { DEVPRINTF((cbdev, "Cannot pre-allocate " "IO port for cardbus device\n")); + free(barlist, M_DEVBUF); return (ENOMEM); } barlist[tmp]->start = @@ -811,7 +813,6 @@ cardbus_alloc_resources(device_t cbdev, device_t child) } /* Allocate IRQ */ - /* XXX: Search CIS for IRQ description */ rid = 0; res = bus_alloc_resource(cbdev, SYS_RES_IRQ, &rid, 0, ~0UL, 1, RF_SHAREABLE); @@ -822,6 +823,7 @@ cardbus_alloc_resources(device_t cbdev, device_t child) dinfo->pci.cfg.intline = rman_get_start(res); pci_write_config(child, PCIR_INTLINE, rman_get_start(res), 1); + free(barlist, M_DEVBUF); return (0); } |
