Make sure whether driver allocated resource before releasing it.
This commit is contained in:
parent
f25c5972da
commit
cd33cef723
@ -854,9 +854,11 @@ jme_detach(device_t dev)
|
||||
}
|
||||
}
|
||||
|
||||
if (sc->jme_irq[0] != NULL)
|
||||
bus_release_resources(dev, sc->jme_irq_spec, sc->jme_irq);
|
||||
if ((sc->jme_flags & (JME_FLAG_MSIX | JME_FLAG_MSI)) != 0)
|
||||
pci_release_msi(dev);
|
||||
if (sc->jme_res[0] != NULL)
|
||||
bus_release_resources(dev, sc->jme_res_spec, sc->jme_res);
|
||||
mtx_destroy(&sc->jme_mtx);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user