pci_host_generic: Set a valid error if allocating a range resource fails
Previously pci_host_generic_attach was returning 0 (success)
incorrectly if allocating a range failed. The error value was 0 from
the previously successful call to bus_set_resource in this case.
Fixes: d79b6b8ec2 pci_host_generic: Don't rewrite resource start address for translation
This commit is contained in:
@@ -216,6 +216,7 @@ pci_host_generic_core_attach(device_t dev)
|
||||
if (sc->ranges[tuple].res == NULL) {
|
||||
device_printf(dev,
|
||||
"failed to allocate resource for range %d\n", tuple);
|
||||
error = ENXIO;
|
||||
goto err_rman_manage;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user