Fix build for systems without PCI_RES_BUS.

Submitted by:	vangyzen
This commit is contained in:
John Baldwin 2016-04-27 19:54:56 +00:00
parent f49794cc8f
commit 5e45663658
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=298717

View File

@ -4150,8 +4150,8 @@ pci_detach(device_t dev)
error = bus_generic_detach(dev);
if (error)
return (error);
sc = device_get_softc(dev);
#ifdef PCI_RES_BUS
sc = device_get_softc(dev);
error = bus_release_resource(dev, PCI_RES_BUS, 0, sc->sc_bus);
if (error)
return (error);