mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-15 15:06:42 +00:00
octusb: fix detach loop over USB ports
MFC after: 2 weeks Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
08b96108ae
commit
0ca3c38188
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=348497
@ -179,12 +179,12 @@ octusb_octeon_detach(device_t dev)
|
||||
if (nports > OCTUSB_MAX_PORTS)
|
||||
panic("octusb: too many USB ports %d", nports);
|
||||
for (i = 0; i < nports; i++) {
|
||||
if (sc->sc_dci.sc_irq_res[0] && sc->sc_dci.sc_intr_hdl[0]) {
|
||||
if (sc->sc_dci.sc_irq_res[i] && sc->sc_dci.sc_intr_hdl[i]) {
|
||||
err = bus_teardown_intr(dev, sc->sc_dci.sc_irq_res[i],
|
||||
sc->sc_dci.sc_intr_hdl[i]);
|
||||
sc->sc_dci.sc_intr_hdl[i] = NULL;
|
||||
}
|
||||
if (sc->sc_dci.sc_irq_res) {
|
||||
if (sc->sc_dci.sc_irq_res[i]) {
|
||||
bus_release_resource(dev, SYS_RES_IRQ, 0,
|
||||
sc->sc_dci.sc_irq_res[i]);
|
||||
sc->sc_dci.sc_irq_res[i] = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user