Fix an error case I missed in the previous change so that the CIS resource

is fully cleaned up if we fail to find the CIS in the devices ROM.
This commit is contained in:
John Baldwin 2009-12-30 22:34:26 +00:00
parent ccbb9c359d
commit 3a6b4b04ab
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=201286

View File

@ -530,8 +530,8 @@ cardbus_read_tuple_init(device_t cbdev, device_t child, uint32_t *start,
CARDBUS_EXROM_DATA_INDICATOR) & 0x80) != 0) {
device_printf(cbdev, "Cannot find CIS in "
"Option ROM\n");
bus_release_resource(child, SYS_RES_MEMORY,
*rid, res);
cardbus_read_tuple_finish(cbdev, child, *rid,
res);
*rid = 0;
return (NULL);
}